Closed chris-sanders closed 5 years ago
LXD doesn't have any code that can alter containers in such a way.
So it's either filesystem corruption causing your LXD database to not be written to disk properly and so the change never persisting or it's Juju resetting the container config on startup. The latter seems more likely to me
Ok thanks, I'll check in with the juju team to see what could be causing this.
Thanks, let us know if we can help with anything.
If you need proof of what's going on, starting LXD with --debug
would show all API queries, that should include PUT
calls against /1.0/containers/NAME causing those configuration changes.
5318 Required information
[Sat Aug 31 21:48:10 2019] Ebtables v2.0 registered [Sat Aug 31 21:48:10 2019] audit: type=1400 audit(1567288091.674:23): apparmor="STATUS" operation="profileload" profile="unconfined" name="lxd-juju-89bcd1-4-lxd-0</var/lib/lxd>" pid=3801 comm="apparmor_parser" [Sat Aug 31 21:48:10 2019] br-bond0: port 2(veth3OSOTD) entered blocking state [Sat Aug 31 21:48:10 2019] br-bond0: port 2(veth3OSOTD) entered disabled state [Sat Aug 31 21:48:10 2019] device veth3OSOTD entered promiscuous mode [Sat Aug 31 21:48:10 2019] IPv6: ADDRCONF(NETDEV_UP): veth3OSOTD: link is not ready [Sat Aug 31 21:48:10 2019] eth0: renamed from vethIAW389 [Sat Aug 31 21:48:10 2019] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready [Sat Aug 31 21:48:10 2019] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [Sat Aug 31 21:48:10 2019] IPv6: ADDRCONF(NETDEV_CHANGE): veth3OSOTD: link becomes ready [Sat Aug 31 21:48:10 2019] br-bond0: port 2(veth3OSOTD) entered blocking state [Sat Aug 31 21:48:10 2019] br-bond0: port 2(veth3OSOTD) entered forwarding state [Sat Aug 31 21:48:11 2019] audit: type=1400 audit(1567288092.398:24): apparmor="STATUS" operation="profileload" profile="unconfined" name="lxd-juju-89bcd1-4-lxd-1</var/lib/lxd>" pid=4052 comm="apparmor_parser" [Sat Aug 31 21:48:11 2019] br-bond0: port 3(vethMI29QQ) entered blocking state [Sat Aug 31 21:48:11 2019] br-bond0: port 3(vethMI29QQ) entered disabled state [Sat Aug 31 21:48:11 2019] device vethMI29QQ entered promiscuous mode [Sat Aug 31 21:48:11 2019] IPv6: ADDRCONF(NETDEV_UP): vethMI29QQ: link is not ready [Sat Aug 31 21:48:11 2019] br-bond0: port 3(vethMI29QQ) entered blocking state [Sat Aug 31 21:48:11 2019] br-bond0: port 3(vethMI29QQ) entered forwarding state [Sat Aug 31 21:48:11 2019] eth0: renamed from vethIF469I [Sat Aug 31 21:48:11 2019] IPv6: ADDRCONF(NETDEV_CHANGE): vethMI29QQ: link becomes ready [Sat Aug 31 21:48:11 2019] audit: type=1400 audit(1567288092.666:25): apparmor="STATUS" operation="profileload" label="lxd-juju-89bcd1-4-lxd-0</var/lib/lxd>//&:lxd-juju-89bcd1-4-lxd-0_:unconfined" name="/usr/bin/lxc-start" pid=4389 comm="apparmor_parser"
[Sat Aug 31 21:48:11 2019] audit: type=1400 audit(1567288092.670:26): apparmor="STATUS" operation="profileload" label="lxd-juju-89bcd1-4-lxd-0</var/lib/lxd>//&:lxd-juju-89bcd1-4-lxd-0_:unconfined" name="/usr/bin/man" pid=4390 comm="apparmor_parser"
[Sat Aug 31 21:48:11 2019] audit: type=1400 audit(1567288092.670:27): apparmor="STATUS" operation="profileload" label="lxd-juju-89bcd1-4-lxd-0</var/lib/lxd>//&:lxd-juju-89bcd1-4-lxd-0_:unconfined" name="man_filter" pid=4390 comm="apparmor_parser"
[Sat Aug 31 21:48:11 2019] audit: type=1400 audit(1567288092.670:28): apparmor="STATUS" operation="profileload" label="lxd-juju-89bcd1-4-lxd-0</var/lib/lxd>//&:lxd-juju-89bcd1-4-lxd-0_:unconfined" name="man_groff" pid=4390 comm="apparmor_parser"
[Sat Aug 31 21:48:11 2019] audit: type=1400 audit(1567288092.670:29): apparmor="STATUS" operation="profileload" label="lxd-juju-89bcd1-4-lxd-0</var/lib/lxd>//&:lxd-juju-89bcd1-4-lxd-0_:unconfined" name="/usr/lib/snapd/snap-confine" pid=4391 comm="apparmor_parser"
[Sat Aug 31 21:48:11 2019] audit: type=1400 audit(1567288092.670:30): apparmor="STATUS" operation="profileload" label="lxd-juju-89bcd1-4-lxd-0</var/lib/lxd>//&:lxd-juju-89bcd1-4-lxd-0_:unconfined" name="/usr/lib/snapd/snap-confine//mount-namespace-capture-helper" pid=4391 comm="apparmor_parser"
[Sat Aug 31 21:48:11 2019] audit: type=1400 audit(1567288092.674:31): apparmor="STATUS" operation="profileload" label="lxd-juju-89bcd1-4-lxd-0</var/lib/lxd>//&:lxd-juju-89bcd1-4-lxd-0_:unconfined" name="/usr/sbin/tcpdump" pid=4393 comm="apparmor_parser"
[Sat Aug 31 21:48:11 2019] audit: type=1400 audit(1567288092.674:32): apparmor="STATUS" operation="profileload" label="lxd-juju-89bcd1-4-lxd-0</var/lib/lxd>//&:lxd-juju-89bcd1-4-lxd-0_:unconfined" name="/sbin/dhclient" pid=4388 comm="apparmor_parser"
[Sat Aug 31 21:48:11 2019] br-bond0: port 4(vethL23UIT) entered blocking state
[Sat Aug 31 21:48:11 2019] br-bond0: port 4(vethL23UIT) entered disabled state
[Sat Aug 31 21:48:11 2019] device vethL23UIT entered promiscuous mode
[Sat Aug 31 21:48:11 2019] IPv6: ADDRCONF(NETDEV_UP): vethL23UIT: link is not ready
[Sat Aug 31 21:48:12 2019] eth0: renamed from vethIO9HL4
[Sat Aug 31 21:48:12 2019] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[Sat Aug 31 21:48:12 2019] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[Sat Aug 31 21:48:12 2019] IPv6: ADDRCONF(NETDEV_CHANGE): vethL23UIT: link becomes ready
[Sat Aug 31 21:48:12 2019] br-bond0: port 4(vethL23UIT) entered blocking state
[Sat Aug 31 21:48:12 2019] br-bond0: port 4(vethL23UIT) entered forwarding state
[Sat Aug 31 21:48:16 2019] kauditd_printk_skb: 44 callbacks suppressed
[Sat Aug 31 21:48:16 2019] audit: type=1400 audit(1567288097.166:77): apparmor="STATUS" operation="profilereplace" info="same as current profile, skipping" label="lxd-juju-89bcd1-4-lxd-0</var/lib/lxd>//&:lxd-juju-89bcd1-4-lxd-0_:unconfined" name="/usr/bin/lxc-start" pid=6004 comm="apparmor_parser"
[Sat Aug 31 21:48:16 2019] audit: type=1400 audit(1567288097.178:78): apparmor="STATUS" operation="profilereplace" info="same as current profile, skipping" label="lxd-juju-89bcd1-4-lxd-0</var/lib/lxd>//&:lxd-juju-89bcd1-4-lxd-0_:unconfined" name="lxc-container-default" pid=6011 comm="apparmor_parser"
[Sat Aug 31 21:48:16 2019] audit: type=1400 audit(1567288097.178:79): apparmor="STATUS" operation="profilereplace" info="same as current profile, skipping" label="lxd-juju-89bcd1-4-lxd-0</var/lib/lxd>//&:lxd-juju-89bcd1-4-lxd-0_:unconfined" name="lxc-container-default-cgns" pid=6011 comm="apparmor_parser"
[Sat Aug 31 21:48:16 2019] audit: type=1400 audit(1567288097.178:80): apparmor="STATUS" operation="profilereplace" info="same as current profile, skipping" label="lxd-juju-89bcd1-4-lxd-0</var/lib/lxd>//&:lxd-juju-89bcd1-4-lxd-0_:unconfined" name="lxc-container-default-with-mounting" pid=6011 comm="apparmor_parser"
[Sat Aug 31 21:48:16 2019] audit: type=1400 audit(1567288097.178:81): apparmor="STATUS" operation="profilereplace" info="same as current profile, skipping" label="lxd-juju-89bcd1-4-lxd-0</var/lib/lxd>//&:lxd-juju-89bcd1-4-lxd-0_:unconfined" name="lxc-container-default-with-nesting" pid=6011 comm="apparmorparser"
[Sat Aug 31 21:48:16 2019] audit: type=1400 audit(1567288097.410:82): apparmor="DENIED" operation="mount" info="failed flags match" error=-13 profile="lxd-juju-89bcd1-4-lxd-1</var/lib/lxd>" name="/run/systemd/unit-root/run/lock/" pid=6127 comm="(networkd)" flags="ro, nosuid, nodev, noexec, remount, bind"
[Sat Aug 31 21:48:16 2019] audit: type=1400 audit(1567288097.862:83): apparmor="DENIED" operation="mount" info="failed flags match" error=-13 profile="lxd-juju-89bcd1-4-lxd-2</var/lib/lxd>" name="/run/systemd/unit-root/run/lock/" pid=6584 comm="(networkd)" flags="ro, nosuid, nodev, noexec, remount, bind"
[Sat Aug 31 21:48:17 2019] audit: type=1400 audit(1567288098.170:84): apparmor="DENIED" operation="mount" info="failed flags match" error=-13 profile="lxd-juju-89bcd1-4-lxd-2</var/lib/lxd>" name="/home/" pid=6817 comm="(arter.sh)" flags="ro, nosuid, nodev, remount, bind"
[Sat Aug 31 21:48:17 2019] audit: type=1400 audit(1567288098.234:85): apparmor="DENIED" operation="mount" info="failed flags match" error=-13 profile="lxd-juju-89bcd1-4-lxd-2_</var/lib/lxd>" name="/home/" pid=6924 comm="(y-helper)" flags="ro, nosuid, nodev, remount, bind"
[Sat Aug 31 21:48:18 2019] audit: type=1400 audit(1567288100.013:86): apparmor="STATUS" operation="profileload" label="lxd-juju-89bcd1-4-lxd-0</var/lib/lxd>//&:lxd-juju-89bcd1-4-lxd-0:unconfined" name="lxd-juju-5815ea-2 </var/lib/lxd>" pid=7859 comm="apparmor_parser"
[Sat Aug 31 21:48:21 2019] kauditd_printk_skb: 14 callbacks suppressed
[Sat Aug 31 21:48:21 2019] audit: type=1400 audit(1567288103.111:101): apparmor="STATUS" operation="profileload" label="lxd-juju-89bcd1-4-lxd-0</var/lib/lxd>//&:lxd-juju-89bcd1-4-lxd-0:unconfined" name="lxd-juju-e90a83-0 </var/lib/lxd>" pid=9077 comm="apparmor_parser"
[Sat Aug 31 21:48:21 2019] audit: type=1400 audit(1567288103.194:102): apparmor="STATUS" operation="profileremove" label="lxd-juju-89bcd1-4-lxd-0</var/lib/lxd>//&:lxd-juju-89bcd1-4-lxd-0:unconfined" name="lxd-juju-5815ea-8 </var/lib/lxd>" pid=9138 comm="apparmor_parser"
[Sat Aug 31 21:48:22 2019] audit: type=1400 audit(1567288104.217:103): apparmor="STATUS" operation="profileremove" label="lxd-juju-89bcd1-4-lxd-0</var/lib/lxd>//&:lxd-juju-89bcd1-4-lxd-0:unconfined" name="lxd-juju-e90a83-0 </var/lib/lxd>" pid=9459 comm="apparmor_parser"
[Sat Aug 31 21:50:18 2019] nvme nvme0: async event result 00020101
[Sat Aug 31 21:58:46 2019] audit: type=1400 audit(1567288727.552:104): apparmor="STATUS" operation="profileload" label="lxd-juju-89bcd1-4-lxd-0</var/lib/lxd>//&:lxd-juju-89bcd1-4-lxd-0:unconfined" name="lxd-juju-e90a83-0 </var/lib/lxd>" pid=17712 comm="apparmor_parser"
[Sat Aug 31 21:58:47 2019] audit: type=1400 audit(1567288728.392:105): apparmor="STATUS" operation="profileremove" label="lxd-juju-89bcd1-4-lxd-0</var/lib/lxd>//&:lxd-juju-89bcd1-4-lxd-0:unconfined" name="lxd-juju-e90a83-0 </var/lib/lxd>" pid=17829 comm="apparmor_parser"
[Sat Aug 31 21:59:26 2019] Key type ceph registered
[Sat Aug 31 21:59:26 2019] libceph: loaded (mon/osd proto 15/24)
[Sat Aug 31 21:59:26 2019] rbd: loaded (major 251)
[Sat Aug 31 21:59:26 2019] audit: type=1400 audit(1567288768.109:106): apparmor="STATUS" operation="profilereplace" profile="unconfined" name="lxd-juju-89bcd1-4-lxd-0</var/lib/lxd>" pid=18189 comm="apparmor_parser"
[Sat Aug 31 21:59:40 2019] br-bond0: port 2(veth3OSOTD) entered disabled state
[Sat Aug 31 21:59:40 2019] device veth3OSOTD left promiscuous mode
[Sat Aug 31 21:59:40 2019] br-bond0: port 2(veth3OSOTD) entered disabled state
[Sat Aug 31 21:59:40 2019] audit: type=1400 audit(1567288781.885:107): apparmor="STATUS" operation="profileremove" profile="unconfined" name="lxd-juju-89bcd1-4-lxd-0</var/lib/lxd>" pid=18573 comm="apparmor_parser"
[Sat Aug 31 21:59:43 2019] audit: type=1400 audit(1567288784.805:108): apparmor="STATUS" operation="profileload" profile="unconfined" name="lxd-juju-89bcd1-4-lxd-0</var/lib/lxd>" pid=18608 comm="apparmor_parser"
[
Name: juju-89bcd1-4-lxd-0 Remote: unix:// Architecture: x86_64 Created: 2019/07/18 21:38 UTC Status: Running Type: persistent Profiles: lxd Pid: 18622 Ips: eth0: inet 192.168.0.244 vethR238KG eth0: inet6 fe80::216:3eff:fe05:2fbc vethR238KG lo: inet 127.0.0.1 lo: inet6 ::1 Resources: Processes: 1065 CPU usage: CPU usage (in seconds): 320 Memory usage: Memory (current): 3.00GB Memory (peak): 3.10GB Network usage: eth0: Bytes received: 1.28GB Bytes sent: 327.77MB Packets received: 363201 Packets sent: 369143 lo: Bytes received: 11.21kB Bytes sent: 11.21kB Packets received: 70 Packets sent: 70
Log:
lxc juju-89bcd1-4-lxd-0 20190831215945.453 WARN conf - conf.c:lxc_setup_devpts:1616 - Invalid argument - Failed to unmount old devpts instance
architecture: x86_64 config: boot.autostart: "true" boot.autostart.delay: "60" boot.stop.priority: "10" image.architecture: amd64 image.description: ubuntu 18.04 LTS amd64 (release) (20190627.1) image.label: release image.os: ubuntu image.release: bionic image.serial: "20190627.1" image.version: "18.04" linux.kernel_modules: rbd raw.lxc: |- lxc.cgroup.devices.allow = a lxc.cap.drop= lxc.apparmor.profile = unconfined lxc.mount.auto= lxc.mount.auto=sys:rw proc:rw cgroup:rw security.nesting: "True" security.privileged: "True" user.juju-model: 6218f353-9afa-4eef-822d-549fbb89bcd1 user.network-config: | config: "disabled" user.user-data: |
cloud-config
volatile.base_image: 6ae1c6e92017402f1aee655fa8d785ee9d2337a3369d76115cecad5e7a303e07 volatile.idmap.base: "0" volatile.idmap.next: '[]' volatile.last_state.idmap: '[]' volatile.last_state.power: RUNNING devices: eth0: hwaddr: 00:16:3e:05:2f:bc mtu: "9000" name: eth0 nictype: bridged parent: br-bond0 type: nic root: path: / pool: default type: disk ephemeral: false profiles:
lxd stateful: false description: ""
lxc monitor
while reproducing the issue)Not sure how I could include either of the above since the reproduction happens during boot.
The Profiles in question, when 4-lxd-0 is on the correct profile.