Deploying into jammy lxds fails due to lack of /etc/fstab

Bug #2026267 reported by Barry Price
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu Mirror Charm
New
Undecided
Unassigned

Bug Description

Per summary, deploying into LXD containers running jammy (and/or later series?) fails with a traceback due to those containers not shipping an /etc/fstab file:

2023-07-06 08:25:25 WARNING unit.jammy/1.config-changed logger.go:60 Traceback (most recent call last):
2023-07-06 08:25:25 WARNING unit.jammy/1.config-changed logger.go:60 File "/var/lib/juju/agents/unit-jammy-1/charm/hooks/config-changed", line 1236, in <module>
2023-07-06 08:25:25 WARNING unit.jammy/1.config-changed logger.go:60 hooks.execute(sys.argv)
2023-07-06 08:25:25 WARNING unit.jammy/1.config-changed logger.go:60 File "/var/lib/juju/agents/unit-jammy-1/charm/hooks/charmhelpers/core/hookenv.py", line 934, in execute
2023-07-06 08:25:25 WARNING unit.jammy/1.config-changed logger.go:60 self._hooks[hook_name]()
2023-07-06 08:25:25 WARNING unit.jammy/1.config-changed logger.go:60 File "/var/lib/juju/agents/unit-jammy-1/charm/hooks/config-changed", line 1181, in config_changed
2023-07-06 08:25:25 WARNING unit.jammy/1.config-changed logger.go:60 configure_bind_mounts(conf, hostname)
2023-07-06 08:25:25 WARNING unit.jammy/1.config-changed logger.go:60 File "/var/lib/juju/agents/unit-jammy-1/charm/hooks/config-changed", line 280, in configure_bind_mounts
2023-07-06 08:25:25 WARNING unit.jammy/1.config-changed logger.go:60 update_bind_mounts(required_mounts)
2023-07-06 08:25:25 WARNING unit.jammy/1.config-changed logger.go:60 File "/var/lib/juju/agents/unit-jammy-1/charm/hooks/config-changed", line 241, in update_bind_mounts
2023-07-06 08:25:25 WARNING unit.jammy/1.config-changed logger.go:60 managed_mounts = get_managed_mounts()
2023-07-06 08:25:25 WARNING unit.jammy/1.config-changed logger.go:60 File "/var/lib/juju/agents/unit-jammy-1/charm/hooks/config-changed", line 181, in get_managed_mounts
2023-07-06 08:25:25 WARNING unit.jammy/1.config-changed logger.go:60 with open("/etc/fstab", "r") as f:
2023-07-06 08:25:25 WARNING unit.jammy/1.config-changed logger.go:60 FileNotFoundError: [Errno 2] No such file or directory: '/etc/fstab'

Options could be:

1. Explicitly state no support for containers, optionally adding code to detect a containerised deploy - and warning the operator
2. Gracefully handle the lack of an /etc/fstab and add logic to operate as expected

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.