kubernetes/kops · error

failed to get info for server %v: %w

Error message

failed to get info for server %v: %w

What it means

Wraps the DigitalOcean Droplets.Get failure during bootstrap token verification: the droplet ID from the token could not be fetched from the DO API (auth, rate limit, nonexistent ID), so the node identity cannot be confirmed.

Source

Thrown at upup/pkg/fi/cloudup/do/verifier.go:72

	return &digitalOceanVerifier{
		doClient: doClient,
	}, nil
}

func (o digitalOceanVerifier) VerifyToken(ctx context.Context, rawRequest *http.Request, token string, body []byte) (*bootstrap.VerifyResult, error) {
	if !strings.HasPrefix(token, dometadata.DOAuthenticationTokenPrefix) {
		return nil, bootstrap.ErrNotThisVerifier
	}
	serverIDString := strings.TrimPrefix(token, dometadata.DOAuthenticationTokenPrefix)

	serverID, err := strconv.Atoi(serverIDString)
	if err != nil {
		return nil, fmt.Errorf("invalid authorization token")
	}

	droplet, _, err := o.doClient.Droplets.Get(ctx, serverID)
	if err != nil {
		return nil, fmt.Errorf("failed to get info for server %v: %w", token, err)
	}

	var addresses []string
	var challengeEndpoints []string
	if droplet.Networks != nil {
		for _, nic := range droplet.Networks.V4 {
			if nic.Type == "private" {
				addresses = append(addresses, nic.IPAddress)
				challengeEndpoints = append(challengeEndpoints, net.JoinHostPort(nic.IPAddress, strconv.Itoa(wellknownports.NodeupChallenge)))
			}
		}
		for _, nic := range droplet.Networks.V6 {
			if nic.Type == "private" {
				addresses = append(addresses, nic.IPAddress)
				challengeEndpoints = append(challengeEndpoints, net.JoinHostPort(nic.IPAddress, strconv.Itoa(wellknownports.NodeupChallenge)))
			}
		}
	}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Verify the verifier's DO API token and permissions
  2. Confirm the droplet still exists
  3. Check the wrapped error for the DO API status and retry transient failures
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at upup/pkg/fi/cloudup/do/verifier.go:72 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05). Data as JSON: /api/errors/8a39e7350a0042c8. Report an issue: GitHub.