mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-23 04:36:40 +00:00
fix(ddil): default guest SSH user to ec2-user
Shell E2E SSHes the same ami-ubuntu-* images as ec2-user (tests/e2e/run-multinode-e2e.sh:650). DDIL harness defaulted to ubuntu and hit 'unable to authenticate, attempted methods [none publickey]' — authorized_keys is provisioned under the AMI default account, which is ec2-user, not ubuntu. Continues mulga-siv-57.
This commit is contained in:
@@ -62,7 +62,9 @@ type Witness struct {
|
||||
// names that change between releases.
|
||||
// - DDIL_WITNESS_KEY_NAME (default spinifex-key) — EC2 key pair name
|
||||
// the daemon injects via cloud-init.
|
||||
// - DDIL_GUEST_SSH_USER (default ubuntu) — user for guest SSH.
|
||||
// - DDIL_GUEST_SSH_USER (default ec2-user) — user for guest SSH; matches
|
||||
// the default account on the cluster's ami-ubuntu-* images (shell E2E
|
||||
// uses the same login at tests/e2e/run-multinode-e2e.sh:650).
|
||||
// - DDIL_GUEST_SSH_KEY (required) — private key for guest SSH; must
|
||||
// pair with the public material registered under DDIL_WITNESS_KEY_NAME
|
||||
// so authorized_keys on the cloud-init guest accepts it.
|
||||
@@ -114,7 +116,7 @@ func NewWitness(cluster *Cluster, transport SSH) (*Witness, error) {
|
||||
ssh: transport,
|
||||
hostSigner: hostSigner,
|
||||
guestSigner: guestSigner,
|
||||
guestUser: envDefault("DDIL_GUEST_SSH_USER", "ubuntu"),
|
||||
guestUser: envDefault("DDIL_GUEST_SSH_USER", "ec2-user"),
|
||||
ami: os.Getenv("DDIL_WITNESS_AMI"),
|
||||
instanceType: os.Getenv("DDIL_WITNESS_INSTANCE_TYPE"),
|
||||
keyName: envDefault("DDIL_WITNESS_KEY_NAME", "spinifex-key"),
|
||||
|
||||
Reference in New Issue
Block a user