mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 02:09:56 +00:00
openstack: Return instance name in CurrentNodeName
Previously the OpenStack provider just returned the hostname in CurrentNodeName. With this change, we return the local OpenStack instance name, as the API intended.
This commit is contained in:
parent
3745e0f88c
commit
8167df2965
@ -113,8 +113,13 @@ func (i *Instances) List(name_filter string) ([]types.NodeName, error) {
|
||||
}
|
||||
|
||||
// Implementation of Instances.CurrentNodeName
|
||||
// Note this is *not* necessarily the same as hostname.
|
||||
func (i *Instances) CurrentNodeName(hostname string) (types.NodeName, error) {
|
||||
return types.NodeName(hostname), nil
|
||||
md, err := getMetadata()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return types.NodeName(md.Name), nil
|
||||
}
|
||||
|
||||
func (i *Instances) AddSSHKeyToAllInstances(user string, keyData []byte) error {
|
||||
|
Loading…
Reference in New Issue
Block a user