Hi, i was wondering if there is any logs for the c...
# general
e
Hi, i was wondering if there is any logs for the creation of Cloudcreds when created before a nodedriver init the cluster itself? Having problems with the saving option on the Cloud-creds on a custom created nodedriver, but i can't find any troubleshooting logs for the Cloudcred creations itself. Thanks for your help.
c
iirc it all happens in the browser. It is just creating a secret. You can use browser tools to monitor what the web UI is doing to see it.
❤️ 1
e
Thanks for the reply. Will me help with troubleshooting alot.
s
if the node driver indicates cloudcredentials are required the ui will ensure the user either selects or creates one before showing the cluster create page. otherwise i think the machine config itself would need to contain some kind of credentials. the
cloudcredential
resource is a v3 / norman api resource. i think under the hood, as mentioned by Brandon, it translates to a secret. however the ui will only deal with the cloudcredential resources
🎉 1
e
@stocky-account-63046 but how do i tell my nodedriver to indicate a cloudcred arer required in side the Golang? I tested every possibilty with the StringFlags / Setconfig, i even created a UI Extention to call for the Cloudcred and the UI triggers it with the UI Extention. But at the end im getting an Error that the cloudcred couldn't be found because no "ID" was given.
s
The UI will look for the nodedriver
spec.addCloudCredential
, however it looks like custom node drivers cannot set this correctly (i'll look into getting an issue created. However the ui extensions have a way of working around this, see https://extensions.rancher.io/extensions/next/api/components/node-drivers
cloud-credential
(https://extensions.rancher.io/extensions/next/usecases/node-driver/cloud-credential). Setting to true would use the native method of creating a cloud cred (i think this looks at specific machine config properties), but it's probably best to write a vue component to ensure the correct info is requested and validated
e
Yeah i tried this with the UI Extention, and when i try to create a cluster with my new node driver the UI Extention creates the CloudCred, but then im getting an error with "`actions.js:598 Attempting to load a resource with no id {_status: 201, _statusText: 'Created', _headers: {…}, _req: XMLHttpRequest, _url: 'https://rancher.local/v3/cloudcredentials'} Proxy(v) {type: 'cloudcredential', metadata: {…}, hetznercredentialConfig: {…}, name: 'newcloud', annotations: {…}, …}`" I don't know where to get the ID from or where to look for more troubleshooting. I checked all of my variables for the api-key and there all correct. But this ID error then gets me in a creation loop of the Cloudcred.
s
The UI will attempt to cache a resource once it's fetched, or in the response of a create request. To do this it needs an
id
field, which is missing in this case. Can you just double check, the browser should be making a POST request to
/v3/cloudcredentials
, and the response should contain an
id
field?
hmm, looking at the json in your error message, it looks like it's trying to cache the http response, rather than the http responses
data
(which should contain the id). would it be possible to share your extension code, or confirm that no manual creation of the
cloudcredential
is taking place?
e
Hier is my Extention UI cred vue file: vue
s
generally looks ok, though the starting resource looks odd. there's no
list
action. you should be able to replace https://gist.github.com/Therideru/da0c2fe82c580bfdcff899e5bb7d1949#file-hetzner-vue-L23-L36 with
this.driver = this.value
just in case you haven't found them, here are our built in ones (which should be similar to those used in ui extension)