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

antrea octant plugin does display antrea information for contexts #1519

Closed
rotbau opened this issue Nov 9, 2020 · 5 comments · Fixed by #2951
Closed

antrea octant plugin does display antrea information for contexts #1519

rotbau opened this issue Nov 9, 2020 · 5 comments · Fixed by #2951
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@rotbau
Copy link

rotbau commented Nov 9, 2020

Describe the bug
Using Octant with Antrea plugin to view information on multiple Kubernetes clusters. The kubeconfig I use with Octant has multiple Kubernetes cluster contexts in it. Octant will show relevant information for the selected context as expected, however Antrea does not. Regardless of which context is selected in Octant, antrea will only show information for one context and will not update/change to match selected context.

To Reproduce
Install Octant and antrea plugin per documentation. Have at least Kubernetes clusters deployed that are using antrea (cluster01 and cluster02) and have your kubeconfig configured so you have access to both clusters and can change to either context. Start Octant and observe data in both Octant UI and antrea plugin for cluster01. Change context to a cluster02 and observe octant shows correct infromation for cluster02 but antrea continues to show controlers/agents for cluster01

Expected
Expect antrea plugin to show related antrea objects for the cluster context selected in Octant/

Actual behavior
Antrea plugin appears to only show the information for the first cluster in populates data for (cluster01 in my example) and doesn't change when the context cluster02 is selected in Octant. It always shows output from cluster01 and appears that once antrea shows information for cluster01 (or a specific cluster) that is the only cluster that it will ever show data on. Regardless of context changes in octant or killing / restarting octant. Its like it caches which cluster it is looking at and never refreshes that data.

Versions:
Please provide the following information:

  • Octant version 0.16.1, 0.15.x, 0.13.x
  • Antrea plugin version 0.10.1, 0.10.0
  • Antrea version (Docker image tag). registry.tkg.vmware.run/antrea/antrea-debian v0.9.3_vmware.1
  • Kubernetes version (use kubectl version). If your Kubernetes components have [different versions] - v1.19.1+vmware.2
    (https://kubernetes.io/docs/setup/release/version-skew-policy/), please provide the version for all of them.
  • Container runtime: which runtime are you using (e.g. containerd, cri-o, docker) and which version are you using? -Containerd
  • Linux kernel version on the Kubernetes Nodes (uname -r). 4.19.145-2.ph3. (TKG 1.2)
  • If you chose to compile the Open vSwitch kernel module manually instead of using the kernel module built into the Linux kernel, which version of the OVS kernel module are you using? Include the output of modinfo openvswitch for the Kubernetes Nodes.

Additional context
I have confirmed the behavior running octant on MacOS, headless on Linux Ubuntu 16.04 and the prebuilt antrea-octant container image docker.io/antrea/octant-antrea-ubuntu latest.

(Please consider pasting long output into a GitHub gist or any other pastebin.)

@rotbau rotbau added the kind/bug Categorizes issue or PR as related to a bug. label Nov 9, 2020
@mengdie-song
Copy link
Contributor

Thanks for reporting the issue. I have reproduced the antrea-octant-plugin contexts switching issue in my setup.
We used to use self-generated client in antrea-octant-plugin, however, we can not pick up context switch changes from octant dashboard in this way, so that antrea-octant-plugin does not show content changes during context switch.

I have a quick test that the problem can be solved if we switch to octant internal DashboardClient, and also get confirmation from octant team. From my point, it can also make our plugin code cleaner and have less dependency.

However, antrea-octant-plugin needs to create and delete Traceflow CRDs, but these kinds of APIs are not currently supported by DashboardClient https://github.com/vmware-tanzu/octant/blob/master/pkg/plugin/service/dashboard.go#L16. I have opened a feature enhancement request to octant team for this vmware-archive/octant#1599. We can make the change after octant provides APIs to create and delete resources for plugins to use.

@github-actions
Copy link
Contributor

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment, or this will be closed in 180 days

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 11, 2021
@antoninbas
Copy link
Contributor

I think this is still a valid issue that we haven't taken care of. Removing the "lifecycle/stale" label.

@antoninbas antoninbas removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 11, 2021
@mengdie-song
Copy link
Contributor

Octant has added create and delete APIs in dashboard interface. I will try the latest octant plugin APIs.

@mengdie-song
Copy link
Contributor

Found an issue vmware-archive/octant#2623 when I tried to use latest octant plugin APIs, octant team will take a look. I will work on this after the octant issue is fixed.

antoninbas added a commit to antoninbas/antrea that referenced this issue Oct 30, 2021
We can now support Octant 0.24 (latest version). Older versions (up to
0.19) may be supported as well (not tested).

By updating the Octant module dependency to v0.24.0, we can also start
using the Octant Dashboard client to perform CRUD operations on Antrea
CRDs, thus ensuring that the plugin is always using the correct cluster
context (see antrea-io#1519).

A few other notable things:
* We can remove replace directives in the plugin go.mod file (for now?)
  since K8s dependencies between Antrea and Octant are compatible.
* Octant now has a new logging mechanism for plugins but unfortunately
  it is still buggy so we are not updating our plugin to use it.
* The Dashboard client supports a link generator to easily generate
  links to resources
  (vmware-archive/octant#2276). Unfortunately I
  believe that in practice it would make our plugin code more
  complicated. We can revisit this in the future.

Fixes antrea-io#1519
Fixes antrea-io#2315
Fixes antrea-io#2676

Signed-off-by: Antonin Bas <abas@vmware.com>
antoninbas added a commit to antoninbas/antrea that referenced this issue Nov 1, 2021
We can now support Octant 0.24 (latest version). Older versions (up to
0.19) may be supported as well (not tested).

By updating the Octant module dependency to v0.24.0, we can also start
using the Octant Dashboard client to perform CRUD operations on Antrea
CRDs, thus ensuring that the plugin is always using the correct cluster
context (see antrea-io#1519).

A few other notable things:
* We can remove replace directives in the plugin go.mod file (for now?)
  since K8s dependencies between Antrea and Octant are compatible.
* Octant now has a new logging mechanism for plugins but unfortunately
  it is still buggy so we are not updating our plugin to use it.
* The Dashboard client supports a link generator to easily generate
  links to resources
  (vmware-archive/octant#2276). Unfortunately I
  believe that in practice it would make our plugin code more
  complicated. We can revisit this in the future.

Fixes antrea-io#1519
Fixes antrea-io#2315
Fixes antrea-io#2676

Signed-off-by: Antonin Bas <abas@vmware.com>
antoninbas added a commit to antoninbas/antrea that referenced this issue Nov 30, 2021
We can now support Octant 0.24 (latest version). Older versions (up to
0.19) may be supported as well (not tested).

By updating the Octant module dependency to v0.24.0, we can also start
using the Octant Dashboard client to perform CRUD operations on Antrea
CRDs, thus ensuring that the plugin is always using the correct cluster
context (see antrea-io#1519).

A few other notable things:
* We can remove replace directives in the plugin go.mod file (for now?)
  since K8s dependencies between Antrea and Octant are compatible.
* Octant now has a new logging mechanism for plugins but unfortunately
  it is still buggy so we are not updating our plugin to use it.
* The Dashboard client supports a link generator to easily generate
  links to resources
  (vmware-archive/octant#2276). Unfortunately I
  believe that in practice it would make our plugin code more
  complicated. We can revisit this in the future.

Fixes antrea-io#1519
Fixes antrea-io#2315
Fixes antrea-io#2676

Signed-off-by: Antonin Bas <abas@vmware.com>
antoninbas added a commit that referenced this issue Dec 2, 2021
* Update Antrea Octant plugin to support latest Octant version

We can now support Octant 0.24 (latest version). Older versions (up to
0.19) may be supported as well (not tested).

By updating the Octant module dependency to v0.24.0, we can also start
using the Octant Dashboard client to perform CRUD operations on Antrea
CRDs, thus ensuring that the plugin is always using the correct cluster
context (see #1519).

A few other notable things:
* We can remove replace directives in the plugin go.mod file (for now?)
  since K8s dependencies between Antrea and Octant are compatible.
* Octant now has a new logging mechanism for plugins but unfortunately
  it is still buggy so we are not updating our plugin to use it.
* The Dashboard client supports a link generator to easily generate
  links to resources
  (vmware-archive/octant#2276). Unfortunately I
  believe that in practice it would make our plugin code more
  complicated. We can revisit this in the future.

Fixes #1519
Fixes #2315
Fixes #2676

Signed-off-by: Antonin Bas <abas@vmware.com>

* Override license detection for github.com/opencontainers/go-digest

Signed-off-by: Antonin Bas <abas@vmware.com>

* Fix Docker build for Antrea Octant plugin

Signed-off-by: Antonin Bas <abas@vmware.com>

* More tweaks for license detection

Signed-off-by: Antonin Bas <abas@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants