Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CFE-4053: Fixed bug where default:sys.fqhost contained many spaces #5531

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

larsewi
Copy link
Contributor

@larsewi larsewi commented Jun 5, 2024

Fixed bug where default:sys.fqhost contained many spaces when domain is set in body common control.

Ticket: CFE-4053
Changelog: Commit
Signed-off-by: Lars Erik Wik [email protected]

Build Status

Fixed bug where `default:sys.fqhost` contained many spaces when domain is
set in body common control.

Ticket: CFE-4053
Changelog: Commit
Signed-off-by: Lars Erik Wik <[email protected]>
@larsewi larsewi added the cherry-pick? Fixes which may need to be cherry-picked to LTS branches label Jun 5, 2024
Copy link
Contributor

@vpodzime vpodzime left a comment

Choose a reason for hiding this comment

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

Looks good to me otherwise.

if => strcmp( "$(sys.fqhost)", "$(sys.uqhost).cfengine.com" );

"$(this.promise_filename) FAIL"
unless => strcmp( "$(sys.fqhost)", "$(sys.uqhost).cfengine.com" );
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't expect this to work on my machine. And many other machines...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why is this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Because I don't think my machine has $(sys.uqhost).cfengine.com as its FQDN. Or are we ensuring that somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Aren't we doing that with domain => "cfengine.com" in body common control?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh! I guess we are! I didn't see that. Or rather, I didn't even know it was possible. 😅

Copy link
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.

looks reasonable to me.

@vpodzime vpodzime merged commit fc037ae into cfengine:master Jun 5, 2024
18 of 19 checks passed
@vpodzime vpodzime removed the cherry-pick? Fixes which may need to be cherry-picked to LTS branches label Jun 5, 2024
@vpodzime
Copy link
Contributor

vpodzime commented Jun 5, 2024

backports:
#5532
#5533

EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, "domain",
VDOMAIN, CF_DATA_TYPE_STRING,
"source=agent");
EvalContextClassPutHard(ctx, VDOMAIN, "source=agent");

int ret = snprintf(VFQNAME, CF_MAXVARSIZE, "%s.%s", VUQNAME, VDOMAIN);
Copy link
Member

Choose a reason for hiding this comment

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

@larsewi In this case, the diff is rather big, but the important difference is the change from %511s.%511s to %s.%s. I would've explained this in the commit (as you did in the ticket).

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.

4 participants