Skip to content

ENT-14090: Stopped using system_owned in copy_from acceptance tests (3.24.x)#6132

Merged
larsewi merged 1 commit into
cfengine:3.24.xfrom
larsewi:copy-from-tests-3.24.x
May 19, 2026
Merged

ENT-14090: Stopped using system_owned in copy_from acceptance tests (3.24.x)#6132
larsewi merged 1 commit into
cfengine:3.24.xfrom
larsewi:copy-from-tests-3.24.x

Conversation

@larsewi
Copy link
Copy Markdown
Contributor

@larsewi larsewi commented May 18, 2026

After plucked.sub.cf was regenerated from masterfiles (commit a8a4aa2 on 3.24.x), the system_owned body sets group to sys (gid 3) on Solaris specifically. The destination file created by copy_from with preserve => "true" is opened with the agent's effective gid (0), so VerifyCopiedFileAttributes detects the mismatch against the source's gid and emits an extra Group of ... was 0, set to 3 log line that isn't in the .expected output. This caused 28_inform_testing/01_files/copy_from01.cf and copy_from03.cf to start failing on Solaris 11.

Build Status

After plucked.sub.cf was regenerated from masterfiles, system_owned
picks a group by platform class -- on Solaris that is "sys" (gid 3).
The destination is created with the agent's effective gid (0), so
copy_from with preserve => "true" propagated the source group to the
destination and emitted an unexpected "Group of ... was 0, set to 3"
log line on Solaris.

Define a local agent_owned perms body that sets owner and group from
sys.user_data, matching the agent's effective uid/gid. The destination
is then created with the same uid/gid as the source, so preserve has
no ownership diff to apply and no spurious log lines appear. This
mirrors the pre-regeneration behavior of system_owned, which used
$(sys.user_data[gid]) for the group.

Ticket: ENT-14090
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
@larsewi larsewi force-pushed the copy-from-tests-3.24.x branch from 5280f57 to 27db964 Compare May 19, 2026 08:33
@larsewi larsewi marked this pull request as ready for review May 19, 2026 11:17
@larsewi larsewi merged commit d44ae76 into cfengine:3.24.x May 19, 2026
9 of 10 checks passed
@larsewi larsewi deleted the copy-from-tests-3.24.x branch May 19, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants