Skip to content

Error creating VM's when initially the resources were unavailable. #5

@dxlbnl

Description

@dxlbnl

So I've seen errors creating VM's when initally the vm's couldn't be scheduled due to a full storage pool.
When that issue was resolved the vm's couldn't be scheduled due to the pre-create check failing to get the ssh keys

image

Fix should be in this function:

func (d *Driver) checkKeyPair() error {
cs := d.getClient()
log.Infof("Checking if SSH key pair (%v) already exists...", d.SSHKeyPair)
p := cs.SSH.NewListSSHKeyPairsParams()
p.SetName(d.SSHKeyPair)
res, err := cs.SSH.ListSSHKeyPairs(p)
if err != nil {
return err
}
if res.Count > 0 {
return fmt.Errorf("SSH key pair (%v) already exists.", d.SSHKeyPair)
}
return nil
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions