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

url not updated in agents when integrating with ingress interface (without using agent-discovery-ingress) #194

Open
javierdelapuente opened this issue Sep 27, 2024 · 0 comments

Comments

@javierdelapuente
Copy link
Contributor

Bug Description

Given a deployed jenkins-k8s with jenking-k8s-agents correctly integrated, if the charm is integrated with a charm providing the ingress relation, the url in the agents does not get updated (I am using path routing). That is, the agents are offline and cannot connect to jenkins.

Screenshot from 2024-09-27 13-36-31

To Reproduce

  1. juju deploy jenkins-k8s --channel=latest/edge
  2. juju wait-for application jenkins-k8s
  3. juju deploy jenkins-agent-k8s --num-units=3
  4. juju integrate jenkins-k8s:agent jenkins-agent-k8s:agent
  5. juju wait-for application jenkins-k8s; juju wait-for application jenkins-agent-k8s
  6. juju deploy traefik-k8s --channel=latest/edge --trust
  7. juju integrate jenkins-k8s:ingress traefik-k8s

Now, logging into the jenkins instance, the agents are there, but they are offline.

Environment

I have used a multipass machine created with multipass launch --cpus 8 --memory 16G --disk 50G --name my-juju-vm charm-dev.

ubuntu@my-juju-vm:~$ uname -a
Linux my-juju-vm 5.15.0-122-generic #132-Ubuntu SMP Thu Aug 29 13:45:52 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

ubuntu@my-juju-vm:~$ juju controllers --refresh
Controller  Model             User   Access     Cloud/Region         Models  Nodes    HA  Version
lxd         welcome-lxd       admin  superuser  localhost/localhost       2      1  none  3.5.3  
microk8s*   jenkins-tutorial  admin  superuser  microk8s/localhost        3      -     -  3.5.3  

ubuntu@my-juju-vm:~$ juju version
3.5.3-genericlinux-amd64

ubuntu@my-juju-vm:~$ microk8s version
MicroK8s v1.29.9 revision 7227

ubuntu@my-juju-vm:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.5 LTS
Release:	22.04
Codename:	jammy

ubuntu@my-juju-vm:~/github/canonical/jenkins-k8s-operator$ juju status --relations
Model             Controller  Cloud/Region        Version  SLA          Timestamp
jenkins-tutorial  microk8s    microk8s/localhost  3.5.3    unsupported  13:42:05+02:00

App                Version  Status  Scale  Charm              Channel        Rev  Address         Exposed  Message
jenkins-agent-k8s           active      3  jenkins-agent-k8s  latest/stable   25  10.152.183.135  no       
jenkins-k8s        2.462.2  active      1  jenkins-k8s        latest/edge    125  10.152.183.115  no       
traefik-k8s        2.11.0   active      1  traefik-k8s        latest/edge    211  10.152.183.168  no       Serving at 10.12.97.102

Unit                  Workload  Agent  Address      Ports  Message
jenkins-agent-k8s/0   active    idle   10.1.32.145         
jenkins-agent-k8s/1*  active    idle   10.1.32.151         
jenkins-agent-k8s/2   active    idle   10.1.32.149         
jenkins-k8s/0*        active    idle   10.1.32.143         
traefik-k8s/0*        active    idle   10.1.32.153         Serving at 10.12.97.102

Integration provider     Requirer             Interface         Type     Message
jenkins-agent-k8s:agent  jenkins-k8s:agent    jenkins_agent_v0  regular  
traefik-k8s:ingress      jenkins-k8s:ingress  ingress           regular  
traefik-k8s:peers        traefik-k8s:peers    traefik_peers     peer     

Relevant log output

ubuntu@my-juju-vm:~/github/canonical/jenkins-k8s-operator$ juju show-unit jenkins-agent-k8s/0
jenkins-agent-k8s/0:
  opened-ports: []
  charm: ch:amd64/jammy/jenkins-agent-k8s-25
  leader: false
  life: alive
  relation-info:
  - relation-id: 0
    endpoint: agent
    related-endpoint: agent
    application-data: {}
    related-units:
      jenkins-k8s/0:
        in-scope: true
        data:
          egress-subnets: 10.152.183.115/32
          ingress-address: 10.152.183.115
          jenkins-agent-k8s-0_secret: b5af22dfc622e54cc868d047d9ae9a5e2eec23ddf4c6fe6210bf42cddd76cba3
          jenkins-agent-k8s-1_secret: 9b04ac4ca6a4bec659f49248c661f99ea810c1317846f7afa982b28cfd23c55c
          jenkins-agent-k8s-2_secret: 61a945e04c85f776bc14a8285297c03acf532ece5016a2a49402a36afe85d372
          private-address: 10.152.183.115
          url: http://10.1.32.143:8080
  provider-id: jenkins-agent-k8s-0
  address: 10.1.32.145

ubuntu@my-juju-vm:~/github/canonical/jenkins-k8s-operator$ juju show-unit jenkins-k8s/0
jenkins-k8s/0:
  workload-version: 2.462.2
  opened-ports: []
  charm: ch:amd64/jammy/jenkins-k8s-125
  leader: true
  life: alive
  relation-info:
  - relation-id: 0
    endpoint: agent
    related-endpoint: agent
    application-data: {}
    related-units:
      jenkins-agent-k8s/0:
        in-scope: true
        data:
          egress-subnets: 10.152.183.135/32
          executors: "8"
          ingress-address: 10.152.183.135
          labels: x86_64
          name: jenkins-agent-k8s-0
          private-address: 10.152.183.135
      jenkins-agent-k8s/1:
        in-scope: true
        data:
          egress-subnets: 10.152.183.135/32
          executors: "8"
          ingress-address: 10.152.183.135
          labels: x86_64
          name: jenkins-agent-k8s-1
          private-address: 10.152.183.135
      jenkins-agent-k8s/2:
        in-scope: true
        data:
          egress-subnets: 10.152.183.135/32
          executors: "8"
          ingress-address: 10.152.183.135
          labels: x86_64
          name: jenkins-agent-k8s-2
          private-address: 10.152.183.135
  - relation-id: 2
    endpoint: ingress
    related-endpoint: ingress
    application-data:
      ingress: '{"url": "http://10.12.97.102/jenkins-tutorial-jenkins-k8s"}'
    related-units:
      traefik-k8s/0:
        in-scope: true
        data:
          egress-subnets: 10.152.183.168/32
          ingress-address: 10.152.183.168
          private-address: 10.152.183.168
  provider-id: jenkins-k8s-0
  address: 10.1.32.143

Additional context

No response

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

No branches or pull requests

1 participant