Skip to content

Fixed handling of role and agent fields in data#177

Merged
olehermanse merged 2 commits intocfengine:masterfrom
olehermanse:master
Apr 3, 2026
Merged

Fixed handling of role and agent fields in data#177
olehermanse merged 2 commits intocfengine:masterfrom
olehermanse:master

Conversation

@olehermanse
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown
Contributor

@craigcomstock craigcomstock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome.

systeminfo = ssh_cmd(connection, "systeminfo")
assert systeminfo is None or (type(systeminfo) is str and len(systeminfo) > 0)
# Note: ssh_cmd is supposed to return None on failure however, it seems
# like there are some cases where it returns output on failure
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

specifically I think this is the case e.g. centos-7 which has a rather old version of the script command which we use in case no pty is present (the vagrant shell provisioning case). Agreed about "command not found" being not very robust... we could be more specific or try to find another way around no-pty case other than script command that works back info old distributions like centos-7.

Signed-off-by: Ole Herman Schumacher Elgesem <ole.elgesem@northern.tech>
Signed-off-by: Ole Herman Schumacher Elgesem <ole.elgesem@northern.tech>
@olehermanse olehermanse merged commit 91af7df into cfengine:master Apr 3, 2026
10 checks passed
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