Skip to content

Task/3303 driver new field LoginSshKey with annotation of type: file-to-field-aliases#39

Draft
lukasz-piotrowski-fujitsu wants to merge 3 commits intostory/3302from
task/3303
Draft

Task/3303 driver new field LoginSshKey with annotation of type: file-to-field-aliases#39
lukasz-piotrowski-fujitsu wants to merge 3 commits intostory/3302from
task/3303

Conversation

@lukasz-piotrowski-fujitsu
Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread ci_tools/fsas_nodedriver_template.yml
Comment thread pkg/drivers/fsas/fsas.go Outdated
Comment on lines +532 to +534
if d.LoginSshKey == "" {
return fmt.Errorf(errorMandatoryOption, "Login SSH key", "--fsas-login-ssh-key")
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We could use some more detailed validation. Perhaps we could employ similar approach as for OsImageSshHostPubKey - validate the key through parsing it?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good idea, but implementation is not so trivial.

  1. Field FirstLoginSshKey contains path e.g. /path/to/machine/files/firstLoginSshKey, not the ssh key
  2. Even if I read the content of the file /path/to/machine/files/firstLoginSshKey, then parsing to ssh key fails because Rancher UI flattens the content of the field FirstLoginSshKey, or in other words, it replaces all new line chars (\n) with spaces; this is not a valid PEM format, and ssh parser returns an error. According to Rancher manual, fields that are annotated as file-to-field-aliases should be rendered in UI as buttons "Load From File" but in our case, instead of this button, there is a simple one-line text field.

I am trying to solve/workaround this problem in my current task task/3304.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I guess it is the same issue we have with custom userdata then. We might need to stop this story implementation until UI issue is resolved. Let's discuss further steps on private chat.

@fujitsu-domzalskis fujitsu-domzalskis marked this pull request as draft April 1, 2026 09:25
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.

2 participants