~dashmage/charm-sysconfig:bug-2012581/reboot-notification-fix

Last commit made on 2023-05-15
Get this branch:
git clone -b bug-2012581/reboot-notification-fix https://git.launchpad.net/~dashmage/charm-sysconfig
Only Ashley James can upload to this branch. If you are Ashley James please log in for upload directions.

Branch merges

Branch information

Name:
bug-2012581/reboot-notification-fix
Repository:
lp:~dashmage/charm-sysconfig

Recent commits

35a12ec... by Ashley James

Fix functional test errors

- Fix the error where after clear notification action is run and update
  status is triggered, the grub reboot notification returns.
- Change kernel version check for jammy to something that is available
  in the jammy repos.
- Add new test to check whether kernel_version is absent before setting
  the config.

707c199... by Ashley James

Override reboot detection logic for grub config

- The reboot detection logic for grub conf was replaced with a simple
  diff between the current grub conf file and the one generated from the
  config using grub-mkconfig.
- The "GRUB_TERMINAL=serial" line was removed from grub template since
  it can be inherited from MAAS and also configured by the operator
  through the grub-config-flags option. It also prevents the false
  positive reboot notification during initial deployment.

a2e49a8... by Ashley James

Inherit pre-existing kernel cmdline parameters by default.

- Also prevents overwrite of existing console parameters by the charm.

Reviewed-on: https://code.launchpad.net/~dashmage/charm-sysconfig/+git/charm-sysconfig/+merge/441304
Reviewed-by: Eric Chen <email address hidden>
Reviewed-by: 🤖 prod-jenkaas-bootstack <email address hidden>
Reviewed-by: JamesLin <email address hidden>

0e5531c... by Ashley James

Change grub template + rework parser function

- Inherit pre-existing kernel cmdline parameters by default.
- Remove hard-coded console parameters.
- Rework config parser function to support console parameters.
- Unit tests for config parser function.
- Fix typo in actions.yaml

6f88d54... by Ashley James

Fix clear-notification action

- Also fixes broken functional tests

Reviewed-on: https://code.launchpad.net/~dashmage/charm-sysconfig/+git/charm-sysconfig/+merge/440819
Reviewed-by: Eric Chen <email address hidden>
Reviewed-by: JamesLin <email address hidden>
Reviewed-by: Mert Kirpici <email address hidden>
Reviewed-by: 🤖 prod-jenkaas-bootstack <email address hidden>

9dad387... by Ashley James

Fix existing functional tests.
- This should have been failing without the clear notification action working as intended.
- Fix typo for "update-status".
- Manually triggering the update-status hook requires the context to be set explicitly.

f2da2b5... by Ashley James

Fix clear notification action.

90f72a5... by Gabriel Cocenza

fix-ci by waiting some seconds until config file is ready.

- sometimes the func test fails because the config file is not
  ready yet.
- fixed typo grup to grub.

Reviewed-on: https://code.launchpad.net/~gabrielcocenza/charm-sysconfig/+git/charm-sysconfig/+merge/440274
Reviewed-by: Erhan Sunar <email address hidden>
Reviewed-by: 🤖 prod-jenkaas-bootstack <email address hidden>
Reviewed-by: Martin Kalcok <email address hidden>

33a4d62... by Gabriel Cocenza

added retry with tenacity to check contents of config files.

- sometimes the func test fails because the config file is not
  ready yet.
- fixed typo grup to grub.

41b9c69... by Aliaksandr Vasiuk

Check time of last `clear-notification` run on `update-status`

- Store timestamp in unit's `userdata.kv()` storage on
`clear-notification` action run.
- During `update-status` pull timestamp of the last
`clear-notification` action run to ensure whether the current
resources status was acknowledged.

Fixes LP1997356

Reviewed-on: https://code.launchpad.net/~valexby/charm-sysconfig/+git/charm-sysconfig/+merge/434255
Reviewed-by: Eric Chen <email address hidden>
Reviewed-by: 🤖 prod-jenkaas-bootstack <email address hidden>
Reviewed-by: Erhan Sunar <email address hidden>