Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I cannot upgrade hawkbit package #425

Open
jeronimoagullo opened this issue Oct 6, 2022 · 1 comment
Open

I cannot upgrade hawkbit package #425

jeronimoagullo opened this issue Oct 6, 2022 · 1 comment
Labels

Comments

@jeronimoagullo
Copy link

Hello, I am trying to upgrade hawkbit package instance to modify the default value.yaml but I am facing an error.

My environment

I am running microk8s in a Ubuntu server 22.04 in a x86/64 machine. I have a namespace named cloud2edge in which I have both packages: cloud2edge and hawkbit.

Output of kubectl get pods -n cloud2edge

NAME                                          READY   STATUS                  RESTARTS          AGE
c2e-dispatch-router-dc94c76c-tk4k4            1/1     Running                 13 (81m ago)      7d23h
ditto-mongodb-76c6b5bdc-v6zkz                 1/1     Running                 13 (81m ago)      7d23h
c2e-artemis-646cdc67-5cs8h                    1/1     Running                 13 (81m ago)      7d23h
c2e-service-auth-6b65876cf9-pzvrr             1/1     Running                 13 (81m ago)      7d23h
c2e-service-device-registry-964945c75-qlfb9   1/1     Running                 13 (81m ago)      7d23h
c2e-service-command-router-7798847975-xgm6k   1/1     Running                 13 (81m ago)      7d23h
c2e-adapter-http-7b67c84d-bfgpg               1/1     Running                 13 (81m ago)      7d23h
c2e-adapter-mqtt-59f4bdcb65-vgdmx             1/1     Running                 13 (81m ago)      7d23h
c2e-adapter-amqp-5d776bd54f-sldhh             1/1     Running                 13 (81m ago)      7d23h
c2e-ditto-concierge-7b5954cb8d-m4jhq          1/1     Running                 14 (81m ago)      7d23h
c2e-ditto-thingssearch-585cf85784-dnvxh       1/1     Running                 14 (81m ago)      7d23h
c2e-ditto-connectivity-78f7fd568-jgj65        1/1     Running                 14 (81m ago)      7d23h
c2e-ditto-gateway-9dfd64f5-8qpws              1/1     Running                 14 (81m ago)      7d22h
c2e-ditto-policies-6c66bd59dd-4hrp8           1/1     Running                 14 (81m ago)      7d23h
c2e-ditto-things-7cb478c596-429dd             1/1     Running                 14 (81m ago)      7d23h
c2e-ditto-nginx-797558f4b7-wc4kj              1/1     Running                 12 (81m ago)      7d22h
hawkbit-mysql-master-0                        2/2     Running                 24 (81m ago)      6d22h
hawkbit-rabbitmq-0                            1/1     Running                 11 (81m ago)      6d22h
hawkbit-6bc9cc8c4f-k4624                      1/1     Running                 4 (78m ago)       16h
c2e-ditto-swaggerui-774fd9ddcf-fmqkb          0/1     Init:CrashLoopBackOff   532 (2m57s ago)   7d23h

Expected behaviour

I would like to add TLS to hawkbit. Thus, I would like to change the default port 80 to 8443:

helm upgrade -n cloud2edge hawkbit eclipse-iot/hawkbit --set service.port=8443

Error

The above command returns the following error:

WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /home/sngular/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /home/sngular/.kube/config
Error: UPGRADE FAILED: execution error at (hawkbit/charts/rabbitmq/templates/NOTES.txt:138:4):
PASSWORDS ERROR: you must provide your current passwords when upgrade the release
    'auth.erlangCookie' must not be empty, please add '--set auth.erlangCookie=$RABBITMQ_ERLANG_COOKIE' to the command. To get the current value:

        export RABBITMQ_ERLANG_COOKIE=$(kubectl get secret --namespace cloud2edge hawkbit-rabbitmq -o jsonpath="{.data.rabbitmq-erlang-cookie}" | base64 --decode)

If I run the above command I get the password, I tested to print it and the result is the following:

export RABBITMQ_ERLANG_COOKIE=$(kubectl get secret --namespace cloud2edge hawkbit-rabbitmq -o jsonpath="{.data.rabbitmq-erlang-cookie}" | base64 --decode)
echo $RABBITMQ_ERLANG_COOKIE

result: gXJ6vShMegTO3lUXym1G6lTczUVpMeZB

Then, I run the command adding the rabbitmq password:

 helm upgrade -n cloud2edge hawkbit eclipse-iot/hawkbit --set service.port=8443 --set auth.erlangCookie=$RABBITMQ_ERLANG_COOKIE

But I get the same result:

WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /home/sngular/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /home/sngular/.kube/config
Error: UPGRADE FAILED: execution error at (hawkbit/charts/rabbitmq/templates/NOTES.txt:138:4):
PASSWORDS ERROR: you must provide your current passwords when upgrade the release
    'auth.erlangCookie' must not be empty, please add '--set auth.erlangCookie=$RABBITMQ_ERLANG_COOKIE' to the command. To get the current value:

        export RABBITMQ_ERLANG_COOKIE=$(kubectl get secret --namespace cloud2edge hawkbit-rabbitmq -o jsonpath="{.data.rabbitmq-erlang-cookie}" | base64 --decode)

Issue

I wonder how I can solve it and upgrade the hawkbit deployment. Thank you in advance

@sophokles73
Copy link
Member

Can you try with

helm upgrade -n cloud2edge hawkbit eclipse-iot/hawkbit --set service.port=8443 --set rabbitmq.auth.erlangCookie=$RABBITMQ_ERLANG_COOKIE

?

IMHO the problem is that the pwd is required by the rabbitmq chart which is a dependency of the hawkbit chart and therefore requires its property names to be prefixed with the alias for the rabbitmq chart....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants