Istioctl upgrade wrong URL

It is a bit strange issue. I tried to reproduce it on my local mikube cluster but without any effects… So, during calling istioctl upgrade command, istioctl tries to compose GitHub release URL which is invalid. It is missing amd64 suffix. On the other hand, when I call istioctl manifest apply everything works fine.

Output from istioctl manifest apply

$ istioctl --context istio-debug manifest apply -f pawel-debug-istiooperator.yaml -f profiles/pawel-default.yaml
✔ Istio core installed
✔ Istiod installed
✔ Addons installed
✔ Installation complete

Output from istioctl upgrade -f

$ istioctl --context istio-debug upgrade -f pawel-debug-istiooperator.yaml -f profiles/pawel-default.yaml --dry-run
2020-05-26T10:28:48.053041Z	info	proto: tag has too few fields: "-"
Control Plane - pilot pod - istiod-6fdfdb74cb-9kjgj - version: 1.6.0
Control Plane - pilot pod - istiod-6fdfdb74cb-cfrq8 - version: 1.6.0
Control Plane - pilot pod - istiod-6fdfdb74cb-wwm69 - version: 1.6.0

2020-05-26T10:28:56.049618Z	warn	found 4 CRD of unsupported v1alpha1 security policy: [clusterrbacconfigs.rbac.istio.io rbacconfigs.rbac.istio.io servicerolebindings.rbac.istio.io serviceroles.rbac.istio.io]. The v1alpha1 security policy is no longer supported starting 1.6. It's strongly recommended to delete the CRD of the v1alpha1 security policy to avoid applying any of the v1alpha1 security policy in the unsupported version
Upgrade version check passed: 1.6.0 -> 1.6.0.

2020-05-26T10:28:56.669814Z	info	Error: failed to generate Istio configs from file [pawel-debug-istiooperator.yaml profiles/pawel-default.yaml] for the current version: 1.6.0, error: failed to fetch URL https://github.com/istio/istio/releases/download/1.6.0/istio-1.6.0-linux.tar.gz : 404 Not Found

Error: failed to generate Istio configs from file [pawel-debug-istiooperator.yaml profiles/pawel-default.yaml] for the current version: 1.6.0, error: failed to fetch URL https://github.com/istio/istio/releases/download/1.6.0/istio-1.6.0-linux.tar.gz : 404 Not Found

Output from istioctl upgrade

$ istioctl --context istio-debug upgrade --dry-run
2020-05-26T10:45:00.680190Z	info	proto: tag has too few fields: "-"
Control Plane - pilot pod - istiod-6fdfdb74cb-9kjgj - version: 1.6.0
Control Plane - pilot pod - istiod-6fdfdb74cb-cfrq8 - version: 1.6.0
Control Plane - pilot pod - istiod-6fdfdb74cb-wwm69 - version: 1.6.0

2020-05-26T10:45:16.137258Z	warn	found 4 CRD of unsupported v1alpha1 security policy: [clusterrbacconfigs.rbac.istio.io rbacconfigs.rbac.istio.io servicerolebindings.rbac.istio.io serviceroles.rbac.istio.io]. The v1alpha1 security policy is no longer supported starting 1.6. It's strongly recommended to delete the CRD of the v1alpha1 security policy to avoid applying any of the v1alpha1 security policy in the unsupported version
Upgrade version check passed: 1.6.0 -> 1.6.0.

2020-05-26T10:45:16.968546Z	info	Error: failed to generate Istio configs from file [] for the current version: 1.6.0, error: failed to fetch URL https://github.com/istio/istio/releases/download/1.6.0/istio-1.6.0-linux.tar.gz : 404 Not Found

Error: failed to generate Istio configs from file [] for the current version: 1.6.0, error: failed to fetch URL https://github.com/istio/istio/releases/download/1.6.0/istio-1.6.0-linux.tar.gz : 404 Not Found

Could you tell me where can I set the URL in the IstioOperator manifest?

Thanks,
Pawel

Hi

AFAIK may be you have to delete the crd (unsupported) before upgrading.
See the upgrade notes

May be this will help you.

@Shubham thanks for pointing this. I removed those 4 CRDS, but still have the same problem with wrong URL to the istio release:

$ istioctl --context istio-debug upgrade -f pawel-debug-istiooperator.yaml -f profiles/pawel-default.yaml --dry-run
2020-05-27T09:28:41.813791Z	info	proto: tag has too few fields: "-"
Control Plane - pilot pod - istiod-6fdfdb74cb-9kjgj - version: 1.6.0
Control Plane - pilot pod - istiod-6fdfdb74cb-cfrq8 - version: 1.6.0
Control Plane - pilot pod - istiod-6fdfdb74cb-wwm69 - version: 1.6.0

Upgrade version check passed: 1.6.0 -> 1.6.0.

2020-05-27T09:28:45.671646Z	info	Error: failed to generate Istio configs from file [pawel-debug-istiooperator.yaml profiles/pawel-default.yaml] for the current version: 1.6.0, error: failed to fetch URL https://github.com/istio/istio/releases/download/1.6.0/istio-1.6.0-linux.tar.gz : 404 Not Found

Error: failed to generate Istio configs from file [pawel-debug-istiooperator.yaml profiles/pawel-default.yaml] for the current version: 1.6.0, error: failed to fetch URL https://github.com/istio/istio/releases/download/1.6.0/istio-1.6.0-linux.tar.gz : 404 Not Found

Environment

OS: Mac OS X

Istio: 1.6 (installed by istioctl)

kubectl:
Client Version: version.Info{Major:“1”, Minor:“18”, GitVersion:“v1.18.2”, GitCommit:“52c56ce7a8272c798dbc29846288d7cd9fbae032”, GitTreeState:“clean”, BuildDate:“2020-04-16T23:34:25Z”, GoVersion:“go1.14.2”, Compiler:“gc”, Platform:“darwin/amd64”}
Server Version: version.Info{Major:“1”, Minor:“15+”, GitVersion:“v1.15.11-gke.9”, GitCommit:“e1af17fd873e15a48769e2c7b9851405f89e3d0d”, GitTreeState:“clean”, BuildDate:“2020-04-06T20:56:54Z”, GoVersion:“go1.12.17b4”, Compiler:“gc”, Platform:“linux/amd64”}

Am i understanding right you are having current version is 1.6.0. and you are trying to upgrade it to 1.6.0.

can you try this --force flag.

Yes. For example, I want to introduce changes in the control plane (for example enable Grafana). In this case should I use istioctl upgrade or istioctl manifest apply?

When I use --force flag the output is the same. Here is how to reproduce it on the minikube cluster

$ minikube start --kubernetes-version=1.14.7 --cpus=5 --memory=5500mb
😄  minikube v1.8.1 on Darwin 10.14.6
✨  Automatically selected the hyperkit driver. Other choices: docker, virtualbox
💿  Downloading VM boot image ...
🔥  Creating hyperkit VM (CPUs=5, Memory=5500MB, Disk=20000MB) ...
🐳  Preparing Kubernetes v1.14.7 on Docker 19.03.6 ...
🚀  Launching Kubernetes ...
🌟  Enabling addons: default-storageclass, storage-provisioner
⌛  Waiting for cluster to come online ...
🏄  Done! kubectl is now configured to use "minikube"
$ istioctl --context minikube install --set profile=default
Detected that your cluster does not support third party JWT authentication. Falling back to less secure first party JWT. See https://istio.io/docs/ops/best-practices/security/#configure-third-party-service-account-tokens for details.
✔ Istio core installed
✔ Istiod installed
✔ Addons installed
✔ Ingress gateways installed
✔ Installation complete
$ istioctl --context minikube upgrade --force --dry-run
2020-05-27T10:44:20.620944Z	info	proto: tag has too few fields: "-"
Control Plane - ingressgateway pod - istio-ingressgateway-64b6f7f96d-6lwqk - version: 1.6.0
Control Plane - pilot pod - istiod-694d645947-c8z9p - version: 1.6.0

2020-05-27T10:44:20.780122Z	warn	found 4 CRD of unsupported v1alpha1 security policy: [clusterrbacconfigs.rbac.istio.io rbacconfigs.rbac.istio.io servicerolebindings.rbac.istio.io serviceroles.rbac.istio.io]. The v1alpha1 security policy is no longer supported starting 1.6. It's strongly recommended to delete the CRD of the v1alpha1 security policy to avoid applying any of the v1alpha1 security policy in the unsupported version
Upgrade version check passed: 1.6.0 -> 1.6.0.

2020-05-27T10:44:21.144259Z	info	Error: failed to generate Istio configs from file [] for the current version: 1.6.0, error: failed to fetch URL https://github.com/istio/istio/releases/download/1.6.0/istio-1.6.0-linux.tar.gz : 404 Not Found

Error: failed to generate Istio configs from file [] for the current version: 1.6.0, error: failed to fetch URL https://github.com/istio/istio/releases/download/1.6.0/istio-1.6.0-linux.tar.gz : 404 Not Found

oh you install default version and you want to enable other components like grafana as you mention above.
then you would create overlays file like this for grafana

apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
spec:
  addonComponents:
    grafana:
      enabled: true

istioctl manifest apply -f <filename
see this https://istio.io/docs/setup/install/istioctl/#configure-component-settings

May be this time it works.

@Shubham, yes. It works with istioctl manifest apply but does not work with istioctl upgrade. So, I want to know what is the reason. And should I set somehow a link to the GitHub release?

@k_pawel AFAIK upgrade is used for upgrade the istio to new version.

if you enable any component in istio you should enabled it during intallation time.
here are the different profiles you use:

and the best you can use istioOperator by which you can easily apply the update using kubectl

link: https://github.com/istio/istio/releases/

I believe this was fixed in https://github.com/istio/istio/pull/24050. I suspect that will be in the next point release 1.6.1.