Skip to content

Conversation

@dtantsur
Copy link
Member

No description provided.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 21, 2023
@openshift-ci openshift-ci bot requested review from andfasano and hardys April 21, 2023 09:13
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 21, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dtantsur

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 21, 2023
@dtantsur dtantsur force-pushed the test branch 2 times, most recently from 578f272 to 092f63d Compare April 26, 2023 12:35

func (b *ignitionBuilder) hostNameFixService() ignition_config_types_32.Unit {
script := fmt.Sprintf(`
if [ "$(hostnamectl hostname)" =~ ^localhost(\.localdomain)?$ ]]; then
Copy link
Member

Choose a reason for hiding this comment

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

Since you aren't removing the dispatcher script (which I think is a good thing), I don't think this will ever be true.

I think what this service wants to do is detect if we only have a --transient hostname set and convert it to a --static one.

If /etc/hostname gets copied by coreos-installer then that will work, at the cost of it being baked in such that even the later appearance of a DHCP hostname will not cause it to change (maybe that's a good thing?).

If we want this to happen as late in the process as possible, maybe IPA itself should do it just before calling coreos-installer?

Copy link
Member

Choose a reason for hiding this comment

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

If /etc/hostname gets copied by coreos-installer

coreos/fedora-coreos-tracker#697 suggests that it doesn't, as recently as March.

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay, then we're back to the ignition approach, I'm afraid.

if [ "$(hostnamectl hostname)" =~ ^localhost(\.localdomain)?$ ]]; then
echo Localhost detected, setting hostname to %[1]s;
hostnamectl set-hostname --static --transient "%[1]s";
echo "%[1]s" > /etc/hostname;
Copy link
Member

Choose a reason for hiding this comment

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

I think hostnamectl set-hostname --static already has this effect.

echo "$NEW" > /etc/hostname;
fi`, b.hostname)

script = strings.Replace(script, "\n", " ", -1)
Copy link
Member

Choose a reason for hiding this comment

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

oof

@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 15, 2023

@dtantsur: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-metal-ipi-serial-ipv4 c5540ba link true /test e2e-metal-ipi-serial-ipv4
ci/prow/e2e-metal-ipi-sdn-bm c5540ba link true /test e2e-metal-ipi-sdn-bm

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@dtantsur
Copy link
Member Author

Okay, confirmed: this does not work after the instance is deployed. But at least I now have a reproducer.

@dtantsur dtantsur closed this May 16, 2023
@dtantsur dtantsur deleted the test branch May 16, 2023 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants