Code Monkey home page Code Monkey logo

Comments (4)

dsupru avatar dsupru commented on September 28, 2024 2

I am experiencing the same issue as @mateoflorido : I run ubuntu in Vagrant (with a VirtualBox provider); cluster comes up fine on the first boot, but if I reboot the VM I get that dex-auth issue

Please find more information below @DnPlas:

Running microk8s kubectl logs dex-auth-operator-0 -n kubeflow

2022-05-26 17:08:07 ERROR juju-log oidc-client:2: Uncaught exception while in charm code:
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-dex-auth-5/charm/venv/ops/model.py", line 1284, in _run
    result = run(args, **kwargs)
  File "/usr/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '('/var/lib/juju/tools/unit-dex-auth-5/relation-get', '-r', '2', '-', '', '--app', '--format=json')' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./src/charm.py", line 209, in <module>
    main(Operator)
  File "/var/lib/juju/agents/unit-dex-auth-5/charm/venv/ops/main.py", line 394, in main
    charm = charm_class(framework)
  File "./src/charm.py", line 44, in __init__
    self.interfaces = get_interfaces(self)
  File "/var/lib/juju/agents/unit-dex-auth-5/charm/venv/serialized_data_interface/__init__.py", line 263, in get_interfaces
    requires = {
  File "/var/lib/juju/agents/unit-dex-auth-5/charm/venv/serialized_data_interface/__init__.py", line 264, in <dictcomp>
    name: SerializedDataInterface(
  File "/var/lib/juju/agents/unit-dex-auth-5/charm/venv/serialized_data_interface/__init__.py", line 110, in __init__
    others = {
  File "/var/lib/juju/agents/unit-dex-auth-5/charm/venv/serialized_data_interface/__init__.py", line 111, in <dictcomp>
    app.name: bag.get("_supported_versions")
  File "/usr/lib/python3.8/_collections_abc.py", line 660, in get
    return self[key]
  File "/var/lib/juju/agents/unit-dex-auth-5/charm/venv/ops/model.py", line 400, in __getitem__
    return self._data[key]
  File "/var/lib/juju/agents/unit-dex-auth-5/charm/venv/ops/model.py", line 384, in _data
    data = self._lazy_data = self._load()
  File "/var/lib/juju/agents/unit-dex-auth-5/charm/venv/ops/model.py", line 748, in _load
    return self._backend.relation_get(self.relation.id, self._entity.name, self._is_app)
  File "/var/lib/juju/agents/unit-dex-auth-5/charm/venv/ops/model.py", line 1351, in relation_get
    return self._run(*args, return_output=True, use_json=True)
  File "/var/lib/juju/agents/unit-dex-auth-5/charm/venv/ops/model.py", line 1286, in _run
    raise ModelError(e.stderr)
ops.model.ModelError: b'ERROR "" is not a valid unit or application\n'
2022-05-26 17:08:07 ERROR juju.worker.caasoperator.uniter.dex-auth/5.operation runhook.go:146 hook "oidc-client-relation-broken" (via hook dispatching script: dispatch) failed: exit status 1
2022-05-26 17:08:07 INFO juju.worker.caasoperator.uniter.dex-auth/5 resolver.go:150 awaiting error resolution for "relation-broken" hook 

Pod dex-auth seem to be running fine:
Output from microk8s kubectl logs dex-auth-69474d4bc-kztv4 -n kubeflow:

time="2022-05-26T16:42:39Z" level=info msg="config issuer: http://10.64.140.43.nip.io/dex"
time="2022-05-26T16:42:39Z" level=info msg="kubernetes client apiVersion = dex.coreos.com/v1"
time="2022-05-26T16:42:39Z" level=info msg="creating custom Kubernetes resources"
time="2022-05-26T16:42:39Z" level=info msg="checking if custom resource authcodes.dex.coreos.com has been created already..."
time="2022-05-26T16:42:39Z" level=info msg="The custom resource authcodes.dex.coreos.com already available, skipping create"
time="2022-05-26T16:42:39Z" level=info msg="checking if custom resource authrequests.dex.coreos.com has been created already..."
time="2022-05-26T16:42:39Z" level=info msg="The custom resource authrequests.dex.coreos.com already available, skipping create"
time="2022-05-26T16:42:39Z" level=info msg="checking if custom resource oauth2clients.dex.coreos.com has been created already..."
time="2022-05-26T16:42:39Z" level=info msg="The custom resource oauth2clients.dex.coreos.com already available, skipping create"
time="2022-05-26T16:42:39Z" level=info msg="checking if custom resource signingkeies.dex.coreos.com has been created already..."
time="2022-05-26T16:42:39Z" level=info msg="The custom resource signingkeies.dex.coreos.com already available, skipping create"
time="2022-05-26T16:42:39Z" level=info msg="checking if custom resource refreshtokens.dex.coreos.com has been created already..."
time="2022-05-26T16:42:39Z" level=info msg="The custom resource refreshtokens.dex.coreos.com already available, skipping create"
time="2022-05-26T16:42:39Z" level=info msg="checking if custom resource passwords.dex.coreos.com has been created already..."
time="2022-05-26T16:42:39Z" level=info msg="The custom resource passwords.dex.coreos.com already available, skipping create"
time="2022-05-26T16:42:39Z" level=info msg="checking if custom resource offlinesessionses.dex.coreos.com has been created already..."
time="2022-05-26T16:42:39Z" level=info msg="The custom resource offlinesessionses.dex.coreos.com already available, skipping create"
time="2022-05-26T16:42:39Z" level=info msg="checking if custom resource connectors.dex.coreos.com has been created already..."
time="2022-05-26T16:42:39Z" level=info msg="The custom resource connectors.dex.coreos.com already available, skipping create"
time="2022-05-26T16:42:39Z" level=info msg="checking if custom resource devicerequests.dex.coreos.com has been created already..."
time="2022-05-26T16:42:39Z" level=info msg="The custom resource devicerequests.dex.coreos.com already available, skipping create"
time="2022-05-26T16:42:39Z" level=info msg="checking if custom resource devicetokens.dex.coreos.com has been created already..."
time="2022-05-26T16:42:39Z" level=info msg="The custom resource devicetokens.dex.coreos.com already available, skipping create"
time="2022-05-26T16:42:39Z" level=info msg="config storage: kubernetes"
time="2022-05-26T16:42:39Z" level=info msg="config static client: Ambassador Auth OIDC"
time="2022-05-26T16:42:39Z" level=info msg="config connector: local passwords enabled"
time="2022-05-26T16:42:39Z" level=info msg="config skipping approval screen"
time="2022-05-26T16:42:39Z" level=info msg="listening (http) on 0.0.0.0:5556"

And juju debug-log:

application-dex-auth: 17:18:08 INFO juju.worker.caasoperator.uniter.dex-auth/5 awaiting error resolution for "relation-broken" hook
application-dex-auth: 17:18:09 ERROR unit.dex-auth/5.juju-log oidc-client:2: Uncaught exception while in charm code:
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-dex-auth-5/charm/venv/ops/model.py", line 1284, in _run
    result = run(args, **kwargs)
  File "/usr/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '('/var/lib/juju/tools/unit-dex-auth-5/relation-get', '-r', '2', '-', '', '--app', '--format=json')' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./src/charm.py", line 209, in <module>
    main(Operator)
  File "/var/lib/juju/agents/unit-dex-auth-5/charm/venv/ops/main.py", line 394, in main
    charm = charm_class(framework)
  File "./src/charm.py", line 44, in __init__
    self.interfaces = get_interfaces(self)
  File "/var/lib/juju/agents/unit-dex-auth-5/charm/venv/serialized_data_interface/__init__.py", line 263, in get_interfaces
    requires = {
  File "/var/lib/juju/agents/unit-dex-auth-5/charm/venv/serialized_data_interface/__init__.py", line 264, in <dictcomp>
    name: SerializedDataInterface(
  File "/var/lib/juju/agents/unit-dex-auth-5/charm/venv/serialized_data_interface/__init__.py", line 110, in __init__
    others = {
  File "/var/lib/juju/agents/unit-dex-auth-5/charm/venv/serialized_data_interface/__init__.py", line 111, in <dictcomp>
    app.name: bag.get("_supported_versions")
  File "/usr/lib/python3.8/_collections_abc.py", line 660, in get
    return self[key]
  File "/var/lib/juju/agents/unit-dex-auth-5/charm/venv/ops/model.py", line 400, in __getitem__
    return self._data[key]
  File "/var/lib/juju/agents/unit-dex-auth-5/charm/venv/ops/model.py", line 384, in _data
    data = self._lazy_data = self._load()
  File "/var/lib/juju/agents/unit-dex-auth-5/charm/venv/ops/model.py", line 748, in _load
    return self._backend.relation_get(self.relation.id, self._entity.name, self._is_app)
  File "/var/lib/juju/agents/unit-dex-auth-5/charm/venv/ops/model.py", line 1351, in relation_get
    return self._run(*args, return_output=True, use_json=True)
  File "/var/lib/juju/agents/unit-dex-auth-5/charm/venv/ops/model.py", line 1286, in _run
    raise ModelError(e.stderr)
ops.model.ModelError: b'ERROR "" is not a valid unit or application\n'
application-dex-auth: 17:18:09 ERROR juju.worker.caasoperator.uniter.dex-auth/5.operation hook "oidc-client-relation-broken" (via hook dispatching script: dispatch) failed: exit status 1

Hope that helps.

Edit:
This too is relation-broken error, below is a screenshot of juju status --color

Screen Shot 2022-05-26 at 1 28 39 PM

from dex-auth-operator.

mateoflorido avatar mateoflorido commented on September 28, 2024 1

I had the same problem. However the steps to replicate it are different in my case.

Reproduction Steps:

  • Install MicroK8s using this guide guide with the 1.21 channel.
  • Deploy the Kubeflow Bundle
  • Wait until all units are active
  • Restart MicroK8s.
  • The dex-auth unit will remain in error state.

from dex-auth-operator.

DnPlas avatar DnPlas commented on September 28, 2024

Hi @mateoflorido , could you please share the logs of both the pod (dex-auth) and the juju debug-log output? Also, do you see an error related to a missing relation or is it something different?

from dex-auth-operator.

natalian98 avatar natalian98 commented on September 28, 2024

Fixed by #62

from dex-auth-operator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.