-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bug in get_dhcp_pid (CoreOS) #2784
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2784 +/- ##
===========================================
+ Coverage 71.97% 71.99% +0.01%
===========================================
Files 103 104 +1
Lines 15692 15844 +152
Branches 2486 2268 -218
===========================================
+ Hits 11295 11407 +112
- Misses 3881 3914 +33
- Partials 516 523 +7
... and 4 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
This is the current version being deployed to the Azure fleet for other distros. This update contains a fix for: Failed to get the PID of the DHCP client: invalid literal for int() with base 10: 'MainPID=1640' The upstream fix (stripping MainPid=) is in Azure/WALinuxAgent#2784. The patch has also been updated to fix the error: Unable to setup the persistent firewall rules: [Errno 30] Read-only file system: '/lib/systemd/system/waagent-network-setup.service' by redirecting unit file installation to /etc/systemd/system. Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
This is the current version being deployed to the Azure fleet for other distros. This update contains a fix for: Failed to get the PID of the DHCP client: invalid literal for int() with base 10: 'MainPID=1640' The upstream fix (stripping MainPid=) is in Azure/WALinuxAgent#2784. The patch has also been updated to fix the error: Unable to setup the persistent firewall rules: [Errno 30] Read-only file system: '/lib/systemd/system/waagent-network-setup.service' by redirecting unit file installation to /etc/systemd/system. Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
This is the current version being deployed to the Azure fleet for other distros. This update contains a fix for: Failed to get the PID of the DHCP client: invalid literal for int() with base 10: 'MainPID=1640' The upstream fix (stripping MainPid=) is in Azure/WALinuxAgent#2784. The patch has also been updated to fix the error: Unable to setup the persistent firewall rules: [Errno 30] Read-only file system: '/lib/systemd/system/waagent-network-setup.service' by redirecting unit file installation to /etc/systemd/system. This change requires handling in manglefs.sh as package installation unfortunately uses the same path. Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
This is the current version being deployed to the Azure fleet for other distros. This update contains a fix for: Failed to get the PID of the DHCP client: invalid literal for int() with base 10: 'MainPID=1640' The upstream fix (stripping MainPid=) is in Azure/WALinuxAgent#2784. The patch has also been updated to fix the error: Unable to setup the persistent firewall rules: [Errno 30] Read-only file system: '/lib/systemd/system/waagent-network-setup.service' by redirecting unit file installation to /etc/systemd/system. This change requires handling in manglefs.sh as package installation unfortunately uses the same path. This also requires adding a dependency on systemd-sysext.service to that unit, as it depends on python. A final change is handling interface restart. RedHat and Ubuntu bounce a single link while Flatcar has so far used the "coreos" implementation (restart the whole systemd-networkd), which forced a full dhcp lease renewal. Follow the approaches of other distros by copying their implementation of restart_if. Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
This is the current version being deployed to the Azure fleet for other distros. This update contains a fix for: Failed to get the PID of the DHCP client: invalid literal for int() with base 10: 'MainPID=1640' The upstream fix (stripping MainPid=) is in Azure/WALinuxAgent#2784. The patch has also been updated to fix the error: Unable to setup the persistent firewall rules: [Errno 30] Read-only file system: '/lib/systemd/system/waagent-network-setup.service' by redirecting unit file installation to /etc/systemd/system. This change requires handling in manglefs.sh as package installation unfortunately uses the same path. This also requires adding a dependency on systemd-sysext.service to that unit, as it depends on python. A final change is handling interface restart. RedHat and Ubuntu bounce a single link while Flatcar has so far used the "coreos" implementation (restart the whole systemd-networkd), which forced a full dhcp lease renewal. Follow the approaches of other distros by copying their implementation of restart_if. Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
This is the current version being deployed to the Azure fleet for other distros. This update contains a fix for: Failed to get the PID of the DHCP client: invalid literal for int() with base 10: 'MainPID=1640' The upstream fix (stripping MainPid=) is in Azure/WALinuxAgent#2784. The patch has also been updated to fix the error: Unable to setup the persistent firewall rules: [Errno 30] Read-only file system: '/lib/systemd/system/waagent-network-setup.service' by redirecting unit file installation to /etc/systemd/system. This change requires handling in manglefs.sh as package installation unfortunately uses the same path. This also requires adding a dependency on systemd-sysext.service to that unit, as it depends on python, which is done through a drop-in. A final change is handling interface restart. RedHat and Ubuntu bounce a single link while Flatcar has so far used the "coreos" implementation (restart the whole systemd-networkd), which forced a full dhcp lease renewal. Follow the approaches of other distros by copying their implementation of restart_if. Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
CoreOs and derivatives (e.g. Flatcar) use "systemctl show -p MainPID systemd-networkd" to get the PID of the DHCP client. This command will return something similar to "
MainPID=<PID>
", while the existing code expects only an int (the "<PID>
" part). This is a very old bug exposed by adding Flatcar to the tests.The fix removes "MainPID=" from the command's output.
The PR also includes some fixes for pylint pointing out issues in import statements.