mirror of https://github.com/kubernetes/kops.git
commit
9d7a7fc6e8
|
|
@ -57,7 +57,7 @@ func (c *DeleteSecretCmd) Run(args []string) error {
|
|||
}
|
||||
|
||||
if len(secrets) == 0 {
|
||||
return fmt.Errorf("secret %q not found")
|
||||
return fmt.Errorf("secret not found")
|
||||
}
|
||||
|
||||
if len(secrets) != 1 {
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ func (e *Instance) Find(c *fi.Context) (*Instance, error) {
|
|||
request.Attribute = aws.String("userData")
|
||||
response, err := cloud.EC2.DescribeInstanceAttribute(request)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error querying EC2 for user metadata for instance %q: %v", *i.InstanceId)
|
||||
return nil, fmt.Errorf("error querying EC2 for user metadata for instance %q: %v", *i.InstanceId, err)
|
||||
}
|
||||
if response.UserData != nil {
|
||||
b, err := base64.StdEncoding.DecodeString(aws.StringValue(response.UserData.Value))
|
||||
|
|
|
|||
|
|
@ -520,5 +520,5 @@ func (c *AWSCloud) FindDNSHostedZone(clusterDNSName string) (string, error) {
|
|||
return id, nil
|
||||
}
|
||||
|
||||
return "", fmt.Errorf("Found multiple hosted zones matching cluster %q; please specify the ID of the zone to use")
|
||||
return "", fmt.Errorf("Found multiple hosted zones matching cluster %q; please specify the ID of the zone to use", clusterDNSName)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ func (ha HashAlgorithm) FromString(s string) (*Hash, error) {
|
|||
}
|
||||
|
||||
if len(s) != l {
|
||||
return nil, fmt.Errorf("invalid %q hash - unexpected length %s", ha, len(s))
|
||||
return nil, fmt.Errorf("invalid %q hash - unexpected length %d", ha, len(s))
|
||||
}
|
||||
|
||||
hashValue, err := hex.DecodeString(s)
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ func (c *VFSContext) ReadFile(location string) ([]byte, error) {
|
|||
// Handle our special case schemas
|
||||
u, err := url.Parse(location)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error parsing location %q - not a valid URI")
|
||||
return nil, fmt.Errorf("error parsing location %q - not a valid URI", location)
|
||||
}
|
||||
|
||||
switch u.Scheme {
|
||||
|
|
|
|||
|
|
@ -1520,7 +1520,7 @@ func DeleteIAMRole(cloud fi.Cloud, r *ResourceTracker) error {
|
|||
}
|
||||
_, err := c.IAM.DeleteRolePolicy(request)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error deleting IAM role policy %q %q", roleName, policyName, err)
|
||||
return fmt.Errorf("error deleting IAM role policy %q %q: %v", roleName, policyName, err)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -623,7 +623,7 @@ func GetInstanceUserData(cloud *awsup.AWSCloud, instanceID string) ([]byte, erro
|
|||
request.Attribute = aws.String("userData")
|
||||
response, err := cloud.EC2.DescribeInstanceAttribute(request)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error querying EC2 for user metadata for instance %q: %v", instanceID)
|
||||
return nil, fmt.Errorf("error querying EC2 for user metadata for instance %q: %v", instanceID, err)
|
||||
}
|
||||
if response.UserData != nil {
|
||||
b, err := base64.StdEncoding.DecodeString(aws.StringValue(response.UserData.Value))
|
||||
|
|
|
|||
Loading…
Reference in New Issue