Comments (10)
I find out that there is already support for this feature implemented here. But it doesn't work with the kubadm drop-in for any reason.
docker-systemctl-replacement v1.4.2456
from docker-systemctl-replacement.
Yes, the feature is implemented and I have seen it to work properly.
So it would be interesting to see which value is considered to be wrong. Would you mind to attach the relevant files? (may be with passwords xxxed). Any idea what values should be different?
Also check the output of the properties like
systemctl.py environment cron
systemctl.py show cron
systemctl.py cat cron
from docker-systemctl-replacement.
By the way, I do see now that there is a different directory prefix. Would you mind moving the config file into a different path like
/lib/systemd/system/kubelet.service.d/10-kubeadm.conf
from docker-systemctl-replacement.
# systemctl.py cat kubelet
[Unit]
Description=kubelet: The Kubernetes Node Agent
Documentation=https://kubernetes.io/docs/home/
[Service]
ExecStart=/usr/bin/kubelet
Restart=always
StartLimitInterval=0
RestartSec=10
[Install]
WantedBy=multi-user.target
This is exactly the content of /lib/systemd/system/kubelet.service
without the overrides of 10-kubeadm.conf
.
# cat /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
# Note: This dropin only works with kubeadm and kubelet v1.11+
[Service]
Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf"
Environment="KUBELET_CONFIG_ARGS=--config=/var/lib/kubelet/config.yaml"
# This is a file that "kubeadm init" and "kubeadm join" generates at runtime, populating the KUBELET_KUBEADM_ARGS variable dynamically
EnvironmentFile=-/var/lib/kubelet/kubeadm-flags.env
# This is a file that the user can use for overrides of the kubelet args as a last resort. Preferably, the user should use
# the .NodeRegistration.KubeletExtraArgs object in the configuration files instead. KUBELET_EXTRA_ARGS should be sourced from this file.
EnvironmentFile=-/etc/default/kubelet
ExecStart=
ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS
from docker-systemctl-replacement.
Moving to /lib/systemd/system/kubelet.service.d/10-kubeadm.conf
doesn't work either.
from docker-systemctl-replacement.
I have started to check into that
- only in /lib/ the *.confs are actually read
- even after moving, the values are not added
So, it is actually two problems
- a plain bug about reading the confs where "*.conf" is parsed but the values do not get present
- systemd' systemctl behaves different by adding overrides from all locations
from docker-systemctl-replacement.
Actually, my testcases war partially wrong. The systemd config reader is just fine, but I noticed from your example that is was missing the option to reset a value by giving an emtpy line in the xx.service descriptor.
That is also tested in test_8051 now. The test_8052 will check your specific kubelet example, so it should work in your setup as expected by now - at version v1.4.2505
from docker-systemctl-replacement.
I tested it with version v1.4.2505 and it worked like a charme.
There should be more people like you. Thank you for the great support!
from docker-systemctl-replacement.
I have started to create a number of testcases to cover the drop-in functionalty..... however try-and-error did show that systemd will check all systemd directories but it will ignore some drop-in files.
It seems that the drop-in files are loaded alphabetically by filename, and if the filename exists in multiple override.d directories then only the uppermost is used, mostly /etc stuff.
That did require a complete reimplementation as for v1.4.2521
from docker-systemctl-replacement.
I guess it is fixed now.
from docker-systemctl-replacement.
Related Issues (20)
- Version tag 1.5.1706 HOT 1
- 'systemctl' not working HOT 16
- Starting a service during image build / docker file, hangs HOT 7
- Possible to work with ansible service_facts module? HOT 1
- systemctl3.py not working on Rocky Linux 8 HOT 1
- Misleading error message interaction between ExecStart= and ExecStartPost= HOT 3
- systemctl enable doesn't copy service file to right place. HOT 1
- When control-C on systemctl log -f xxx, it raise an ugly KeyboardInterrupt HOT 2
- systemctl disable not disabling service at container restart HOT 1
- can this script be used on ubuntu 22.04? HOT 1
- How is this suppoused to be ussed? HOT 1
- ERROR:systemctl: nextcloud.service: Failed to parse service type, ignoring: exec HOT 1
- Install to Centos6.8 HOT 1
- StartLimitIntervalSec=0 or how to Restart Forever HOT 1
- status command shows unit files ignored by SystemD HOT 2
- systemctl show does not respect multiple `-p/--property` switches HOT 1
- BlockingIOError: [Errno 11] Resource temporarily unavailable HOT 11
- Can't understand how logs and tty are working
- Support for systemd-inhibit? HOT 1
- systemctl start virtstoraged.service Startup exception HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-systemctl-replacement.