Code Monkey home page Code Monkey logo

Comments (2)

teq0 avatar teq0 commented on June 12, 2024

I was having this problem, and it was caused by clusterAPI::spec::providerConfig being empty. The panic is caused by ProviderConfig().SSH being nil here - https://github.com/kubicorn/kubicorn/blob/master/pkg/initapi/ssh.go#L29. If you fix the code to check for nil you still don't get very far because everything else is missing.

I haven't figured out what yet, but something appears to be blanking out that section in cluster.yaml sometimes, possibly after certain errors occur. Solution was to regenerate the file with kubicorn create, or just back it up so you can restore it if something overwrites it.

Edit: This appears to be because the ProviderConfig is cleared once the Reconciler has been created, but if there's another error after that before actual provisioning the ProviderConfig is lost.

Edit2: It's here. At this point newCluster.ClusterAPI.Spec.ProviderConfig is empty. In the case of Azure the cluster object has been (re)constructed in https://github.com/kubicorn/kubicorn/blob/master/cloud/azure/public/resources/resourcegroup.go#L131, which starts with an empty ProviderConfig, and only copies a couple of fields into it from the resourceGroup, and these (in my case) are also empty.

from kubicorn.

teq0 avatar teq0 commented on June 12, 2024

I've now played with this a bit more and traced through it many times, and I must be missing something because I can't see how it ever worked. Has anyone successfully deployed an Azure cluster in the last few months?

The thing I can't understand is that, as per my previous comment, resourcegroup.immutableRender() returns a cluster object with the ProviderConfig created from a new struct i.e. empty, so most or all of the original ProviderConfig is lost at this point.

What puzzles me even more is that AtomicReconciler.Actual() is passed in a cluster config in the parameter known, but this is not used in the function, it instead starts with r.known but it loops over the resources and overwrites the actualCluster variable inside the loop, so it only ever returns a cluster object with the resource info of the last resource in the list.

At which point the original ProviderGroup details from cluster.yaml are lost, but they are used after that, like to get the SSH details, and are stored back to the original file, so they are lost forever. You can't even retry.

Sorry if I'm just sharing my ignorance and I'm missing something pretty basic.

from kubicorn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.