Skip to content

set the FQDN setting to our real FQDN so that derived settings work#491

Open
evgeni wants to merge 1 commit intomasterfrom
fqdn
Open

set the FQDN setting to our real FQDN so that derived settings work#491
evgeni wants to merge 1 commit intomasterfrom
fqdn

Conversation

@evgeni
Copy link
Copy Markdown
Member

@evgeni evgeni commented May 5, 2026

Why are you introducing these changes? (Problem description, related links)

Foreman uses the domain and fqdn settings (which default to their respective values from Facter) to calculate several defaults for URL and E-mail related settings. As our containers don't have a correct FQDN (since 4ef4632), this creates wrong defaults, breaking certain workflows.

See #482 for details.

What are the changes introduced in this pull request?

  • The fqdn and domain settings are set to sane values.

How to test this pull request

Steps to reproduce:

  • The updated tests should be sufficient.

Checklist

  • Tests added/updated (if applicable)
  • Documentation updated (if applicable)

Fixes: #482

@evgeni
Copy link
Copy Markdown
Member Author

evgeni commented May 5, 2026

Should we add a test that asserts that all settings that contain fqdns/domains have the right value?

@ehelms
Copy link
Copy Markdown
Member

ehelms commented May 5, 2026

What about the scenario where the user is providing a cname?

@evgeni
Copy link
Copy Markdown
Member Author

evgeni commented May 5, 2026

What about it? That wasn't working for unattended url before, and doesn't work now ;)

@evgeni
Copy link
Copy Markdown
Member Author

evgeni commented May 6, 2026

Tests updated

Comment thread tests/foreman_test.py
assert server_fqdn in settings[0]['value']


@pytest.mark.parametrize("setting", ["administrator", "email_reply_address"])
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

If I am referring to the administrator, should it search for a domain such as rhos-01.prod.psi.rdu2.redhat.com?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

that's what the test does. yeah

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ah, I was testing this, but with the patch it was not showing the correct result—possibly due to some issues on my server. I tried it on a fresh server, and it works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Container hostname change breaks unattended_url for external host registration

3 participants