Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ComputeInstance using Windows images will error resolving externally-managed fields #524

Closed
3 tasks done
tonybenchsci opened this issue Aug 6, 2021 · 3 comments
Closed
3 tasks done
Labels
bug Something isn't working

Comments

@tonybenchsci
Copy link

tonybenchsci commented Aug 6, 2021

Checklist

Bug Description

KCC can be used to create GCP ComputeInstance VMs with Windows Server images. In order to RDP, there needs to be users created first, which GCP supports via the "Set Windows Password" button. Doing this (it seems like the first user is fine, but more than 1 will fail, but not 100% sure) however, creates a state of UpdateFailed

It seems like KCC needs to let this field "float" i.e. be managed be GCP, or parse it as a map instead of a list and save as string(?), or as a workaround (we haven't tried yet) the user needs a round-trip to re-acquire the GCP generated configs under spec.metadata.[]

Kubernetes Cluster Version

1.19.11-gke.2101

Config Connector Version

1.49.0

Config Connector Mode

cluster

Log Output

Update call failed: error expanding resource configuration: error resolving externally-managed fields: error converting state to typed value: .metadata: expected list, got &{map[windows-keys:{"expireOn":"2021-07-30T00:20:13.267Z","userName":"alice","modulus":"REDACTED","email":"[email protected]","exponent":"AQAB"}
      {"expireOn":"2021-07-30T00:23:08.573Z","userName":"bob","modulus":"REDACTED","email":"[email protected]","exponent":"AQAB"}
      {"expireOn":"2021-07-30T00:24:14.715Z","userName":"charlie","modulus":"REDACTED","email":"[email protected]","exponent":"AQAB"}]}
    

Steps to Reproduce

Steps to reproduce the issue

  1. Use KCC to create the ComputeInstance
  2. Use the GCP console to "Set Windows Password" to create a few login users
  3. Observe KCC reconcile state

YAML snippets

apiVersion: compute.cnrm.cloud.google.com/v1beta1
kind: ComputeInstance
metadata:
  name: windows
spec:
  machineType: e2-medium
  zone: us-east4-a
  serviceAccount:
    serviceAccountRef:
      name: windows
    scopes:
    - storage-ro
  networkInterface:
  - networkRef:
      name: default
    accessConfig:
    - networkTier: PREMIUM
  bootDisk:
    initializeParams:
      sourceImageRef:
        external: projects/windows-cloud/global/images/windows-server-2019-dc-v20210713
  metadataStartupScript: |
    Write-Host 'Hello, World! This is a Windows VM'
  tags:
  - windows-eln
@tonybenchsci tonybenchsci added the bug Something isn't working label Aug 6, 2021
@tonybenchsci
Copy link
Author

tonybenchsci commented Aug 6, 2021

Update: The workaround of another round-trip to re-acquire the GCP generated configs under spec.metadata.[key="windows-keys",value="long string"] managed to move the state back to UpToDate

@jcanseco
Copy link
Member

Thank you @tonybenchsci for providing a workaround and an update. It helps us understand the problem more easily and helps other users as well!

I can confirm that I am able to reproduce the issue consistently, and that we should have a fix out within the next 2 releases.

@jcanseco
Copy link
Member

Hi @tonybenchsci, can you try the latest KCC version and see if the issue has been fixed? We put out a bug fix in KCC 1.59.0.

Closing this issue now, but please feel free to add a comment if you find that the issue still exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants