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

[BUG] When the cloud and the edge were disconnected and a List request is made for an empty CR, the edge responded with an error #325

Closed
qclc opened this issue May 26, 2021 · 3 comments · Fixed by #326
Assignees
Labels
kind/bug kind/bug

Comments

@qclc
Copy link
Member

qclc commented May 26, 2021

What happened:

When the cloud and edge are disconnected, and a List request is made for a registered CR, if the number of this custom resources is zero, normally, Yurthub should return an empty CRD List response, as follows:

{"apiVersion":"stable.example.com/v1","items":[],"kind":"CronTabList","metadata":{"continue":"","resourceVersion":"2616035","selfLink":"/apis/stable.example.com/v1/namespaces/default/crontabs"}}

But in fact, the error message is returned as follows:

{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Internal error occurred: no matches for stable.example.com/v1, Resource=crontabs","reason":"InternalError","details":{"causes":[{"message":"no matches for stable.example.com/v1, Resource=crontabs"}]},"code":500}

What you expected to happen:

  • When the connection between cloud and edge is normal and the List operation is performed for CR, the corresponding CRD information should be saved even if the number of resources is empty.
  • When the cloud and edges are disconnected, and a List request is made for an empty number of CR resources
    • If CRD is registered , empty structure will be returned
    • If CRD is not registered , an error message will be returned

How to reproduce it (as minimally and precisely as possible):

  1. Register a CRD but do not create any resources
  2. When the communication between the cloud and the edge is normal, make a list request for this CR
    • You will get the correct reply message with empty list structure
  3. When the cloud and the edge are disconnected, make a list request for this CR resource
    • You will get the error message

Anything else we need to know?:

Environment:

  • OpenYurt version: the latest version
  • Kubernetes version (use kubectl version):
  Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.9", GitCommit:"94f372e501c973a7fa9eb40ec9ebd2fe7ca69848", GitTreeState:"clean", BuildDate:"2020-09-16T13:56:40Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"}
  Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.9", GitCommit:"94f372e501c973a7fa9eb40ec9ebd2fe7ca69848", GitTreeState:"clean", BuildDate:"2020-09-16T13:47:43Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"}
  • OS (e.g: cat /etc/os-release):
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
  • Kernel (e.g. uname -a):
Linux master 3.10.0-1160.25.1.el7.x86_64 #1 SMP Wed Apr 28 21:49:45 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
  • Install tools:
  • Others:

others

/kind bug

@qclc qclc added the kind/bug kind/bug label May 26, 2021
@rambohe-ch
Copy link
Member

@qclc Thank you filing the issue.

This is a known bug, would you like to take over and solve it?

@qclc
Copy link
Member Author

qclc commented May 27, 2021

@qclc Thank you filing the issue.

This is a known bug, would you like to take over and solve it?

Yes, I am willing to take over and solve it.

@rambohe-ch
Copy link
Member

/assgin @qclc

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

Successfully merging a pull request may close this issue.

2 participants