This message was deleted.
# elemental
a
This message was deleted.
s
It is not clear to me on which stage are you struggling. I understand you managed to bootstrap a cluster using the default images we publish. Then from there in order to upgrade you can create a managedOSImage resource as in the documentation you linked to rollout an upgrade. If you have a customized image you can also list it as managedOSversion in the UI as documented here
p
I saw your response on my other question, I'm going to reset everything and spin it up from scratch following that updated doco. If I still have issues I'll report back with more detail and go from there
Ok so yeah I get to this point, I have deployed a 3 node cluster (attached image) and I have deployed my custom image as a managed OS:
Copy code
apiVersion: <http://elemental.cattle.io/v1beta1|elemental.cattle.io/v1beta1>
kind: ManagedOSVersion
metadata:
  name: v1.1.1-custom-build
  namespace: fleet-default
spec:
  metadata:
    displayName: Custom build image
    upgradeImage: myrepo/my-elemental-img:v1.1.1
  type: container
  version: v1.1.1
I have created an upgrade group with the following and it is sitting there with WaitApplied(1):
Copy code
apiVersion: <http://elemental.cattle.io/v1beta1|elemental.cattle.io/v1beta1>
kind: ManagedOSImage
spec:
  clusterTargets:
    - clusterName: pch-test
  managedOSVersionName: v1.1.1-custom-build
  nodeSelector:
    matchLabels:
      <http://kubernetes.io/hostname|kubernetes.io/hostname>: mynode
  osImage: ''
  upgradeContainer:
    envs:
      - name: FORCE
        value: 'true'
status:
  conditions:
    - lastTransitionTime: '2024-05-17T02:28:30Z'
      message: ''
      reason: FleetBundleCreateSuccess
      status: 'True'
      type: FleetBundleCreation
    - lastTransitionTime: '2024-05-17T02:28:30Z'
      message: WaitApplied(1) [Cluster fleet-default/pch-test]
      reason: UnknownReason
      status: 'False'
      type: Ready
    - lastTransitionTime: '2024-05-17T02:28:30Z'
      message: ''
      reason: UnknownReason
      status: 'True'
      type: Processed
How can I troubleshoot this further? Do I need to trigger the upgrade? I thought as soon as I create an upgrade group it will trigger right away? Also if I attempt to create an upgrade group in the UI I get no clusters showing in the list and no managed OS images appearing in the list as per attached screenshots - also showing the list of OS images available, so not sure why none are appearing.
s
The reason you get no clusters to select on the UI I think is caused by the fact that the cluster is already taken by the ManagedOSVersion you already created in advance. I'd suggest to delete the ManagedOsVersion you created manually and then try to create one form the UI. Then you should be capable to select the OS Version of your custom image. I assume the image
myrepo/my-elemental-img:v1.1.1
is reachable from the node. Also if you deployed the
v2.0.2
image you could eventually test a downgrade to
v1.2.3
or viceversa. From this basic scenario then I would try to go into a more fine grained setup by creating your own ManagedOSVersion resource.
p
OMG - ok so it turns out even though the cluster was green in the UI, it wasn't actually fully deployed. Known docker network stack issue and fix here: https://github.com/moby/libnetwork/issues/1090 Basically git kept failing pulling repos in the cattle-cluster-agent pod. With workaround I now have a fully deployed default cluster. I suspect this is what was causing my custom ISO build to fail to initialise as well, testing that now. Also when creating a custom managedOS it has to be registered under an OS channel version, otherwise it prevents the UI interface from working properly. I added by custom managedOS this way and it allows me to select that in the UI as an upgrade (which is currently now running against the default cluster) - this just completed and I have successfully upgraded with my custom ISO - NOICE!. Updated managedOS yaml:
Copy code
apiVersion: <http://elemental.cattle.io/v1beta1|elemental.cattle.io/v1beta1>
kind: ManagedOSVersion
metadata:
  generation: 1
  labels:
    <http://elemental.cattle.io/channel|elemental.cattle.io/channel>: elemental-channel
  name: v1.1.1-custom-build
  namespace: fleet-default
  ownerReferences:
    - apiVersion: <http://elemental.cattle.io/v1beta1|elemental.cattle.io/v1beta1>
      controller: true
      kind: ManagedOSVersionChannel
      name: elemental-channel
      uid: 5db83cc7-3e39-441e-a6ad-50f62c16fbe7
spec:
  metadata:
    displayName: Custom build image
    upgradeImage: myrepo/elemental-img:v1.1.1
  type: container
  version: v1.1.1
As you can see I've added it to the elemental-channel - I had trouble creating a custom channel... any tips on that?
I have fully deployed the cluster from scratch now with my custom ISO and that fix worked for that as well. Thanks for the suggestions - when it was failing with the default image it at least led me to look deeper and uncover the real issue ;)