
When the mtcAgent locks a node, it commands the mtcClient to create a persistent .node_locked flag file at /etc/mtc/tmp/.node_locked. Conversely, when the node is unlocked, the mtcAgent commands the mtcClient to remove this flag file. However, an issue arises where an unlocked node may still have the .node_locked file present after an upgrade-rollback or patch-removal operation. The issue occurs because the OSTree upgrade deployment process runs while the node is locked. During this process, OSTree takes a snapshot of the /etc directory, which includes the .node_locked file. Even if the file is later removed by maintenance actions, after deploy but before reboot, OSTree restores it from the snapshot resulting in the reinstatement of the .node_locked file on an unlocked node. To eliminate this file management conflict, this update moves the persistent .node_locked flag file to a location outside of OSTree's management, specifically to /var/persist/mtc/.node_locked. The directory name 'persist' was chosen to clearly indicate that the files in this directory are intended to persist across reboots. This update also fixed a post install script logging error trying to rename the hwclock.sh.<init>.bak file with one already present. Test Plan: PASS: Verify the creation of the new /var/persist/mtc directory. PASS: Verify any files under this directory persist over reboot. PASS: Verify proper management of the node locked file over upgrade and rollback. PASS: Install a AIO DX and verify the node locked file management. PASS: Verify AIO DX upgrade from MR2PLUS to 24.09 master. PASS: Install a Standard DX System with 1 worker and 2 storage and verify the node locked file management over and following an upgrade from MR2PLUS to 24.09 master. PASS: Verify obsoleted /etc/mtc/tmp/.node_locked file is auto removed by both package install and over a mtcClient startup/restart. PASS: Verify /etc/mtc/tmp dir remains. PASS: Verify mtce debian package installs without error or warning. Closes-Bug: 2095212 Change-Id: I3431abfef74c678fbeaa149bf6ac29ee254be111 Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
Description
Languages
C++
83%
Shell
10.2%
Python
3.3%
C
2.5%
Makefile
1%