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

Edge request API server , when cloudhub create objectsync for node or namespace resources which do not have namesapce, cloudhub report an error #2810

Closed
jidalong opened this issue Apr 25, 2021 · 5 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale

Comments

@jidalong
Copy link
Member

What happened:
Edge request API server , when cloudhub create objectsync for node or namespace resources which do not have namesapce, cloudhub report an error
Edge:
curl 192.168.93.191:10550/api/v1/nodes
cloud:
image

What you expected to happen:

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

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version):

  • KubeEdge version(e.g. cloudcore --version and edgecore --version):

  • Cloud nodes Environment:
    • Hardware configuration (e.g. lscpu):
    • OS (e.g. cat /etc/os-release):
    • Kernel (e.g. uname -a):
    • Go version (e.g. go version):
    • Others:
  • Edge nodes Environment:
    • edgecore version (e.g. edgecore --version):
    • Hardware configuration (e.g. lscpu):
    • OS (e.g. cat /etc/os-release):
    • Kernel (e.g. uname -a):
    • Go version (e.g. go version):
    • Others:
@jidalong jidalong added the kind/bug Categorizes issue or PR as related to a bug. label Apr 25, 2021
@Rachel-Shao
Copy link
Contributor

Is there any error message returned when you execute curl 192.168.93.191:10550/api/v1/nodes ?

@jidalong
Copy link
Member Author

Is there any error message returned when you execute curl 192.168.93.191:10550/api/v1/nodes ?
After curl 10550/api/v1/nodes,edge can print the expected result whitout any errors,but cloud may print some error log in cloudhub like the picture above. Although cloudhub output the error logs, cloudcore and edgecore can still run.

@Rachel-Shao
Copy link
Contributor

@jidalong When Cloudhub processes messages, it first starts ObjectSyncController. ObjectSyncController is the controller of custom CRD objects ObjectSync and ClusterObjectSync. KubeEdge uses K8s CRD to store the latest resourceVersion of resources that have been successfully sent to Edge.

ClusterObjectSync is used to store cluster-wide objects, and ObjectSync is used to store namespace-wide objects.
node belongs to the cluster-scoped object, and it has no namespace.

But the current version of ClusterObjectSync is not currently in use and is waiting to be expanded, so all resources will be stored in ObjectSync for the time being, so there is an error that namespace is null (node shouldn't be in ObjectSync).

As a temporary solution, you can set it to "" if the namespace is null before creatObjectSync.
The above is just my personal understanding:) more detail

@stale
Copy link

stale bot commented Jul 27, 2021

Hello 👋 Looks like there was no activity on this issue for last 90 days.
Do you mind updating us on the status? Is this still reproducible or needed? If yes, just comment on this PR or push a commit. Thanks! 🤗
If there will be no activity for 60 days, this issue will be closed (we can always reopen an issue if we need!).

@stale
Copy link

stale bot commented Sep 25, 2021

Closing for now as there was no activity for last 60 days after marked as stale, let us know if you need this to be reopened! 🤗

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. lifecycle/stale
Projects
None yet
Development

No branches or pull requests

2 participants