Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## \[7.0.9]
### Fixed
* Fixes:
* Fixed SSH provisioning issue for existing node pools when `AppendRKEProvisionUserData` is false
* SSH user configuration is now always added to cloud-init when RKE provisioning is involved, ensuring proper SSH access for both new and existing node pools

## \[7.0.8]
### Fixed
* Fixes:
Expand Down
5 changes: 4 additions & 1 deletion ionos_create_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ func (d *Driver) GetFinalUserData() (userdata string, err error) {
d.CloudInit = ud
}

if d.SSHUser != "root" || d.SSHInCloudInit {
// Always add SSH user configuration when RKE provisioning is involved
// This ensures SSH access works for both new and existing node pools
needsSSHUser := d.SSHUser != "root" || d.SSHInCloudInit || d.RKEProvisionUserData != ""
if needsSSHUser {
d.CloudInit, err = d.addSSHUserToYaml()
if err != nil {
return "", err
Expand Down
24 changes: 24 additions & 0 deletions ionos_create_machine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ packages:
runcmd:
- sh user_script.sh
- sh /etc/rke.sh
users:
- create_groups: false
lock_passwd: true
name: root
no_user_group: true
ssh_authorized_keys:
- ""
sudo: ALL=(ALL) NOPASSWD:ALL
write_files:
- content: some user content
path: /etc/user_script.sh
Expand Down Expand Up @@ -106,6 +114,14 @@ write_files:
hostname: test-host
runcmd:
- sh /etc/rke.sh
users:
- create_groups: false
lock_passwd: true
name: root
no_user_group: true
ssh_authorized_keys:
- ""
sudo: ALL=(ALL) NOPASSWD:ALL
write_files:
- content: some install content
path: /etc/rke.sh
Expand Down Expand Up @@ -150,6 +166,14 @@ packages:
- somepackage
runcmd:
- sh user_script.sh
users:
- create_groups: false
lock_passwd: true
name: root
no_user_group: true
ssh_authorized_keys:
- ""
sudo: ALL=(ALL) NOPASSWD:ALL
write_files:
- content: some user content
path: /etc/user_script.sh
Expand Down
Loading