Charm is making sysctl calls in LXD containers (unsupported)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Neutron Gateway Charm |
Fix Released
|
High
|
Chris MacNaughton |
Bug Description
I am following the guide outlined here: https:/
Steps
-----
# install deps <not shown>
# get openstack-on-lxd source configs
git clone https:/
# Configure LXD on Host
echo fs.inotify.
echo fs.inotify.
echo fs.inotify.
echo vm.max_
echo vm.swappiness=1 | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
sudo lxd init
lxc profile device set default eth0 mtu 9000
# Bootstrap Juju
juju bootstrap --config config.yaml localhost lxd
cat lxd-profile.yaml | lxc profile edit juju-default
# Install Openstack
juju deploy bundle-
# Get coffee...
-----
Once deployment stabilizes'juju status' will show \
neutron-
From Log
--------
1879 2019-05-13 21:52:18 DEBUG juju-log Updating sysctl_file: /etc/sysctl.
1880 2019-05-13 21:52:18 DEBUG config-changed sysctl: cannot stat /proc/sys/
1881 2019-05-13 21:52:19 DEBUG config-changed sysctl: cannot stat /proc/sys/
1882 2019-05-13 21:52:19 DEBUG config-changed sysctl: cannot stat /proc/sys/
1883 2019-05-13 21:52:19 DEBUG config-changed sysctl: cannot stat /proc/sys/
1884 2019-05-13 21:52:19 DEBUG config-changed sysctl: cannot stat /proc/sys/
1885 2019-05-13 21:52:19 DEBUG config-changed sysctl: cannot stat /proc/sys/
1886 2019-05-13 21:52:19 DEBUG config-changed sysctl: cannot stat /proc/sys/
1887 2019-05-13 21:52:19 DEBUG config-changed sysctl: setting key "net.netfilter.
1888 2019-05-13 21:52:19 DEBUG config-changed net.netfilter.
1889 2019-05-13 21:52:19 DEBUG config-changed Traceback (most recent call last):
1890 2019-05-13 21:52:19 DEBUG config-changed File "/var/lib/
1891 2019-05-13 21:52:19 DEBUG config-changed hooks.execute(
1892 2019-05-13 21:52:19 DEBUG config-changed File "/var/lib/
1893 2019-05-13 21:52:19 DEBUG config-changed self._hooks[
1894 2019-05-13 21:52:19 DEBUG config-changed File "/var/lib/
1895 2019-05-13 21:52:19 DEBUG config-changed stopstart, restart_functions)
1896 2019-05-13 21:52:19 DEBUG config-changed File "/var/lib/
1897 2019-05-13 21:52:19 DEBUG config-changed r = lambda_f()
1898 2019-05-13 21:52:19 DEBUG config-changed File "/var/lib/
1899 2019-05-13 21:52:19 DEBUG config-changed (lambda: f(*args, **kwargs)), __restart_
1900 2019-05-13 21:52:19 DEBUG config-changed File "/var/lib/
1901 2019-05-13 21:52:19 DEBUG config-changed return f(*args, **kwargs)
1902 2019-05-13 21:52:19 DEBUG config-changed File "/var/lib/
1903 2019-05-13 21:52:19 DEBUG config-changed '/etc/sysctl.
1904 2019-05-13 21:52:19 DEBUG config-changed File "/var/lib/
1905 2019-05-13 21:52:19 DEBUG config-changed check_call(call)
1906 2019-05-13 21:52:19 DEBUG config-changed File "/usr/lib/
1907 2019-05-13 21:52:19 DEBUG config-changed raise CalledProcessEr
1908 2019-05-13 21:52:19 DEBUG config-changed subprocess.
1909 2019-05-13 21:52:19 ERROR juju.worker.
Full Logs attached
Changed in charm-neutron-gateway: | |
status: | New → Triaged |
importance: | Undecided → High |
milestone: | none → 19.07 |
Changed in charm-neutron-gateway: | |
assignee: | nobody → Chris MacNaughton (chris.macnaughton) |
Changed in charm-neutron-gateway: | |
status: | Fix Committed → Fix Released |
TRIAGE:
The sysctl commands fail when neutron-gateway is deployed in an LXC.
We have patterns in other charms to handle this. See hardening. We simply need a try/except for the sysctl -p or we need to gate based detecting containerization.