#4901 States are not stored properly in sysrestore.state
Closed: Fixed None Opened 9 years ago by mbasti.

Each serviceinstance keeps own Sysrestore instance during installation, which may cause replace actual data in sysrestore.state file with older data. Sysrestore loads the file only during initialization, then uses local cache.

Currently ipa-dnskeysyncd states are not stored because, the states are replaced with old configuration from named.

Example:

service1.create_isntance()
service2.create_instance() # make changes in sysrestore.state
service1.method_which_uses_backup_state()  # this removes the changes made by service2 in sysrestore.state file

Proposed solutions:

  • Don't cache data, load the file before any operation with states
  • OR do not mix serviceinstance calls (and creating instances) with other service instances in code

Found another problem caused by StateFile class in client installation.

ipa-client-install create an instance of StateFile then later starts ipa-client-automount that also create an instance of StateFile record some values and they are written to state file. Then ipa-client-install continues and the state file is rewritten destroying all values recorded by ipa-client-automount.

master:

  • 082c55f Always reload StateFile before getting or modifying the stored values.

Metadata Update from @mbasti:
- Issue assigned to dkupka
- Issue set to the milestone: FreeIPA 4.2

7 years ago

Login to comment on this ticket.

Metadata