Skip to content

charmed kubernetes deploying kata fails #49

@shorif2000

Description

@shorif2000

Get your issue reviewed faster

/var/log/juju/unit-kata-0.log

2022-12-20 11:10:33 ERROR juju.worker.uniter.operation runhook.go:140 hook "install" (via explicit, bespoke hook script) failed: exit status 1
2022-12-20 11:10:33 INFO juju.worker.uniter resolver.go:145 awaiting error resolution for "install" hook
2022-12-20 11:12:51 INFO juju.worker.uniter resolver.go:145 awaiting error resolution for "install" hook
2022-12-20 11:15:33 INFO juju.worker.uniter resolver.go:145 awaiting error resolution for "install" hook
2022-12-20 11:15:34 INFO unit.kata/0.juju-log server.go:316 Reactive main running for hook install
2022-12-20 11:15:34 INFO unit.kata/0.juju-log server.go:316 Invoking reactive handler: reactive/kata.py:42:install_kata
2022-12-20 11:15:35 INFO unit.kata/0.juju-log server.go:316 status-set: maintenance: Installing Kata via apt
2022-12-20 11:15:36 ERROR unit.kata/0.juju-log server.go:316 Hook error:
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-kata-0/.venv/lib/python3.8/site-packages/charms/reactive/__init__.py", line 74, in main
    bus.dispatch(restricted=restricted_mode)
  File "/var/lib/juju/agents/unit-kata-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 390, in dispatch
    _invoke(other_handlers)
  File "/var/lib/juju/agents/unit-kata-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 359, in _invoke
    handler.invoke()
  File "/var/lib/juju/agents/unit-kata-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 181, in invoke
    self._action(*args)
  File "/var/lib/juju/agents/unit-kata-0/charm/reactive/kata.py", line 65, in install_kata
    import_key(gpg_key)
  File "/var/lib/juju/agents/unit-kata-0/.venv/lib/python3.8/site-packages/charmhelpers/fetch/ubuntu.py", line 496, in import_key
    raise GPGKeyError("ASCII armor markers missing from GPG key")
charmhelpers.fetch.GPGKeyError: ASCII armor markers missing from GPG key

2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60 Traceback (most recent call last):
2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60   File "/var/lib/juju/agents/unit-kata-0/charm/hooks/install", line 22, in <module>
2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60     main()
2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60   File "/var/lib/juju/agents/unit-kata-0/.venv/lib/python3.8/site-packages/charms/reactive/__init__.py", line 74, in main
2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60     bus.dispatch(restricted=restricted_mode)
2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60   File "/var/lib/juju/agents/unit-kata-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 390, in dispatch
2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60     _invoke(other_handlers)
2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60   File "/var/lib/juju/agents/unit-kata-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 359, in _invoke
2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60     handler.invoke()
2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60   File "/var/lib/juju/agents/unit-kata-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 181, in invoke
2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60     self._action(*args)
2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60   File "/var/lib/juju/agents/unit-kata-0/charm/reactive/kata.py", line 65, in install_kata
2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60     import_key(gpg_key)
2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60   File "/var/lib/juju/agents/unit-kata-0/.venv/lib/python3.8/site-packages/charmhelpers/fetch/ubuntu.py", line 496, in import_key
2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60     raise GPGKeyError("ASCII armor markers missing from GPG key")
2022-12-20 11:15:36 WARNING unit.kata/0.install logger.go:60 charmhelpers.fetch.GPGKeyError: ASCII armor markers missing from GPG key
2022-12-20 11:15:36 ERROR juju.worker.uniter.operation runhook.go:140 hook "install" (via explicit, bespoke hook script) failed: exit status 1
2022-12-20 11:15:36 INFO juju.worker.uniter resolver.go:145 awaiting error resolution for "install" hook
2022-12-20 11:18:12 INFO juju.worker.uniter resolver.go:145 awaiting error resolution for "install" hook

Description of problem

I tried to deploy kata on charmed kubernetes following https://juju.is/tutorials/charmed-kubernetes-kata-containers#3-deploy-the-kata-containers-extension

$ juju deploy cs:~containers/kata
Located charm "kata" in charm-store, revision 160
Deploying "kata" from charm-store charm "kata", revision 160 in channel stable on focal
$ juju add-relation kata kubernetes-control-plane
$ juju add-relation kata kubernetes-worker
$ juju add-relation kata:untrusted containerd:untrusted

status

$ watch juju status

Every 2.0s: juju status                                                                                                           controller1: Tue Dec 20 11:20:32 2022

Model  Controller       Cloud/Region               Version  SLA          Timestamp
k8s    openstack-cloud  openstack-cloud/RegionOne  2.9.37   unsupported  11:20:33Z

App                       Version   Status  Scale  Charm                     Channel  Rev  Exposed  Message
calico                              active      2  calico                    stable    54  no       Calico is active
containerd                go1.13.8  active      2  containerd                stable    41  no       Container runtime available
easyrsa                   3.0.1     active      1  easyrsa                   stable    26  no       Certificate Authority connected.
etcd                      3.4.5     active      2  etcd                      stable   718  no       Healthy with 2 known peers
kata                                error       2  kata                      stable   160  no       hook failed: "install"
kubeapi-load-balancer     1.18.0    active      1  kubeapi-load-balancer     stable    42  yes      Loadbalancer ready.
kubernetes-control-plane  1.25.5    active      1  kubernetes-control-plane  stable   204  no       Kubernetes control-plane running.
kubernetes-worker         1.25.5    active      1  kubernetes-worker         stable    70  yes      Kubernetes worker running.
openstack-integrator      xena      active      1  openstack-integrator      stable    45  no       Ready

Unit                         Workload  Agent  Machine  Public address  Ports             Message
easyrsa/0*                   active    idle   0        192.168.122.56                    Certificate Authority connected.
etcd/0*                      active    idle   1        192.168.122.92  2379/tcp          Healthy with 2 known peers
etcd/1                       active    idle   2        192.168.122.86  2379/tcp          Healthy with 2 known peers
kubeapi-load-balancer/0*     active    idle   4        192.168.122.84  443/tcp,6443/tcp  Loadbalancer ready.
kubernetes-control-plane/0*  active    idle   5        192.168.122.68  6443/tcp          Kubernetes control-plane running.
  calico/1*                  active    idle            192.168.122.68                    Calico is active
  containerd/1*              active    idle            192.168.122.68                    Container runtime available
  kata/0*                    error     idle            192.168.122.68                    hook failed: "install"
kubernetes-worker/0*         active    idle   7        192.168.122.83  80/tcp,443/tcp    Kubernetes worker running.
  calico/2                   active    idle            192.168.122.83                    Calico is active
  containerd/2               active    idle            192.168.122.83                    Container runtime available
  kata/1                     error     idle            192.168.122.83                    hook failed: "install"
openstack-integrator/0*      active    idle   10       192.168.122.97                    Ready

Machine  State    Address         Inst id                               Series  AZ    Message
0        started  192.168.122.56  e13424db-b0ad-4c4f-bd8d-7f129705b331  focal   nova  ACTIVE
1        started  192.168.122.92  98196a15-f345-4e17-b329-6f640410881f  focal   nova  ACTIVE
2        started  192.168.122.86  7d691ec0-a43e-419f-939e-02a9f48465cc  focal   nova  ACTIVE
4        started  192.168.122.84  b0007809-8508-4e63-b277-5168e70d1335  focal   nova  ACTIVE
5        started  192.168.122.68  77f6cdde-0f4f-4c5f-827f-f3beb3f2c2e1  focal   nova  ACTIVE
7        started  192.168.122.83  de383db9-cb45-4d2f-8c1b-ce4f430af19a  focal   nova  ACTIVE
10       started  192.168.122.97  a79e5a07-0e00-4fda-a140-5a02257c585b  focal   nova  ACTIVE


Expected result

Install with no issues

Actual result

Errors on install

kata                                error       2  kata                      stable   160  no       hook failed: "install"

Further information

I am using charmed Kubernetes on canonical OpenStack yoga version, bare metal.

I check the result of /var/lib/juju/agents/unit-kata-0/charm/reactive/kata.py

gpg_key = requests.get(
            'http://download.opensuse.org/repositories/home:/katacontainers:/'
            'releases:/{}:/master/x{}/Release.key'.format(arch, release)).text

and its seems empty https://download.opensuse.org/repositories/home:/katacontainers:/releases:/x86_64:/master/

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIncorrect behaviourneeds-reviewNeeds to be assessed by the team.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions