mirror of https://github.com/k3s-io/k3s
Merge pull request #56359 from stewart-yu/fixExceptedError
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Modify the judgment conditions **What this PR does / why we need it**: It should be a mistakes. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes #56347 **Special notes for your reviewer**: **Release note**: ```release-note NONE ```pull/6/head
commit
e551886c5e
|
@ -91,7 +91,7 @@ func (m *metadata) InstanceID(name types.NodeName) (string, error) {
|
||||||
// InstanceType returns the type of the specified instance.
|
// InstanceType returns the type of the specified instance.
|
||||||
func (m *metadata) InstanceType(name types.NodeName) (string, error) {
|
func (m *metadata) InstanceType(name types.NodeName) (string, error) {
|
||||||
instanceType, err := m.get(metadataTypeInstanceType)
|
instanceType, err := m.get(metadataTypeInstanceType)
|
||||||
if err == nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("could not get instance type: %v", err)
|
return "", fmt.Errorf("could not get instance type: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue