CLI seems to ignore image arugment
Downloading the CLI and then running the install command seems to ignore the provided image argument, defaulting to a quite old one instead:
$ noobaa install --noobaa-image=noobaa/noobaa-core:5.18.6
INFO[0000] CLI version: 5.18.6
INFO[0000] noobaa-image: noobaa/noobaa-core:master-20240520
INFO[0000] operator-image: noobaa/noobaa-operator:5.18.6
INFO[0000] noobaa-db-image: quay.io/sclorg/postgresql-15-c9s
INFO[0000] Namespace: default
My expectation would be that the image default is aligned with the most recent released one. And that providing that argument would actually override it.
HI @ctron
Thanks for that. We are using the flag all the time, and it works.
After you have a working cluster, could you look at the logs of the core and see what version is actually there (it is written on the first line of the logs).
The working cluster had noobaa/noobaa-core:master-20240520
Could you share the operator logs?
Ok, I think I figured out what's going on. Trying to reproduce with a fresh cluster (minikube).
When I use noobaa install (no args), I get:
➜ ~ noobaa install
INFO[0000] CLI version: 5.18.6
INFO[0000] noobaa-image: noobaa/noobaa-core:master-20240520
INFO[0000] operator-image: noobaa/noobaa-operator:5.18.6
INFO[0000] noobaa-db-image: quay.io/sclorg/postgresql-15-c9s
…
When I add the arg, but don't uninstall first, it just keeps the version. And showing the old version.
Trying with upgrade I get:
➜ ~ noobaa upgrade --noobaa-image=noobaa/noobaa-core:5.18.6
INFO[0000] System versions prior to upgrade:
INFO[0000] CLI version: 5.18.6
INFO[0000] noobaa-image: noobaa/noobaa-core:master-20240520
INFO[0000] operator-image: noobaa/noobaa-operator:5.18.6
[…]
WARN[0003] ⚠ The desired noobaa image and the running image are not the same
INFO[0003] CLI version: 5.18.6
INFO[0003] noobaa-image: noobaa/noobaa-core:5.18.6
INFO[0003] operator-image: noobaa/noobaa-operator:5.18.6
INFO[0003] noobaa-db-image: quay.io/sclorg/postgresql-15-c9s
INFO[0003] Namespace: default
But I do get:
➜ ~ oc get pods noobaa-core-0 -o json | jq .spec.containers[].image
"noobaa/noobaa-core:5.18.6"
"noobaa/noobaa-core:5.18.6"
So it seems to change the version then.
- the log output shows the information from the args (not the installation)
- running
installagain, would apply the new setting
@ctron
- CLI Install is only for installation, and will not change the versions.
- Cleaning the installation with uninstall does not clean the CRs and if there are bracing changes it will not work properly. to fully uninstall and remove the CRs you should use the
--cleanupflag - The
upgradeshould work, assuming the image you are using is in a higher version then the one installed. - Running
installagain will not apply any changes.
Hope that answers, let me know if there is anything else here.
I think the gist of this issue (for me) is that install didn't work as (I) expected. Running it again, it looked like it did ok, but actually didn't to anything.
Maybe re-running install should point that out? Or warn, like upgrade does, about a version mismatch. Maybe pointing out on top that it's not CLI arguments, but something stored in the cluster.
@ctron I have moved the issue to the operator.
Make sense, we might consider issuing a warning, or failing the installation if the cluster is already installed.
One point that is worth mentioning, the install option is only valid for upstream use.