Skip to content

Conversation

@pablintino
Copy link
Contributor

It seems that the dataplane-operator/baremetal operator is/are having issues building the authorized_keys content of the cloud-init configuration, making BM instances cloud-init to fail when booting.

As a pull request owner and reviewers, I checked that:

  • Appropriate testing is done and actually running
  • Appropriate documentation exists and/or is up-to-date:
    • README in the role
    • Content of the docs/source is reflecting the changes

@openshift-ci openshift-ci bot requested review from afazekas and cescgina April 30, 2024 13:06
@pablintino pablintino requested review from cjeanner and removed request for afazekas and cescgina April 30, 2024 13:06
@cjeanner
Copy link
Contributor

/approve

Could successfully test it against va-hci env.

This patch here is mostly a workaround before we get openstack-k8s-operators/openstack-baremetal-operator#164 in.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 30, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cjeanner

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

The pull request process is described here

Details 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

It seems that the dataplane-operator/baremetal operator
is/are having issues building the authorized_keys content
of the cloud-init configuration, making BM instances
cloud-init to fail when booting.
@pablintino pablintino force-pushed the va/edpm-single-ssh-key branch from 00714ff to ef290d5 Compare April 30, 2024 14:24
@viroel
Copy link
Contributor

viroel commented Apr 30, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Apr 30, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 78ad8aa into main Apr 30, 2024
@openshift-merge-bot openshift-merge-bot bot deleted the va/edpm-single-ssh-key branch April 30, 2024 18:26
@hjensas
Copy link
Contributor

hjensas commented Apr 30, 2024

Did you raise a bug?

Authorized keys in cloud-config should be a list.
https://cloudinit.readthedocs.io/en/latest/reference/modules.html#ssh

AFICT from the code it is setting it as a string.

templateParameters["AuthorizedKeys"] = strings.TrimSuffix(string(sshSecret.Data["authorized_keys"]), "\n")
    ssh-authorized-keys: {{ .AuthorizedKeys }}

https://github.com/openstack-k8s-operators/openstack-baremetal-operator/blob/9a04c56acdf52d1c309b656dfdd4025a95320926/pkg/openstackbaremetalset/baremetalhost.go#L73C3-L73C109
https://github.com/openstack-k8s-operators/openstack-baremetal-operator/blob/9a04c56acdf52d1c309b656dfdd4025a95320926/templates/openstackbaremetalset/cloudinit/userdata#L7

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants