tps: Fix activation failing when in inconsistent state
From wb:753d9829990c1e6fdaa9a5ec6d9eeb4e:
> dic 30 01:17:03 amnesia tps[5697]: Traceback (most recent call last):
> dic 30 01:17:03 amnesia tps[5697]: File "/usr/lib/python3/dist-packages/tps/dbus/object.py", line 146, in do_handle_method_call
> dic 30 01:17:03 amnesia tps[5697]: result = func(*parameters)
> dic 30 01:17:03 amnesia tps[5697]: File "/usr/lib/python3/dist-packages/tps/configuration/feature.py", line 70, in Activate
> dic 30 01:17:03 amnesia tps[5697]: is_active = self.refresh_is_active()
> dic 30 01:17:03 amnesia tps[5697]: File "/usr/lib/python3/dist-packages/tps/configuration/feature.py", line 266, in refresh_is_active
> dic 30 01:17:03 amnesia tps[5697]: self.IsActive = is_active
> dic 30 01:17:03 amnesia tps[5697]: File "/usr/lib/python3/dist-packages/tps/configuration/feature.py", line 192, in IsActive
> dic 30 01:17:03 amnesia tps[5697]: self.on_activated()
> dic 30 01:17:03 amnesia tps[5697]: File "/usr/lib/python3/dist-packages/tps/configuration/feature.py", line 250, in on_activated
> dic 30 01:17:03 amnesia tps[5697]: for mount in self.Mounts: mount.check_is_active()
> dic 30 01:17:03 amnesia tps[5697]: File "/usr/lib/python3/dist-packages/tps/configuration/mount.py", line 348, in check_is_active
> dic 30 01:17:03 amnesia tps[5697]: raise IsInactiveException()
What's happening here is that activation fails because the feature is already in the config file, which causes IsActive
to be set, which calls check_is_active
, which raises an IsInactiveException
because the bindings are not active. So there was an inconsistent state between the feature and its bindings: The feature was enabled (i.e. in the config file) but its bindings were not active.
TODO
-
Documentation -
Point to doc on file system check when total failure to activate -
Remove the bits on the file system check from /doc/first_steps/shutdown
-
Edited by sajolida