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

the server could not find the requested resource #9622

Open
liuqi-sun opened this issue Nov 1, 2024 · 3 comments · May be fixed by #9627
Open

the server could not find the requested resource #9622

liuqi-sun opened this issue Nov 1, 2024 · 3 comments · May be fixed by #9627
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@liuqi-sun
Copy link

What happened?

I saw a "the server could not find the requested resource " error when I created resource. Sometimes it works, sometimes it doesn't.I found inconsistencies in the body namespce field of the /api/v1/appdeploymentfromfile API.Sometimes it's "default", sometimes it's "_all". If the value is "default", the resource is successfully created.
I think this is a bug in the front-end, the back-end logic is not more scientific .

Modify the scheme as follows:
1.The namespace field is added when the resource is created
2.Modified front end
3.Modified back end,I will submit a PR

What did you expect to happen?

success

How can we reproduce it (as minimally and precisely as possible)?

apiVersion: k8s.tmlake.com/v1
kind: AclProfile
metadata:
name: test-ap
spec:
partitionName: k8s-adc
name: lj-test
aclList:
- action: allow
addr: 1.1.1.1
enable: "on"
- action: deny
addr: 2.2.2.2
enable: "off"

There is no resource namespace field

Anything else we need to know?

No response

What browsers are you seeing the problem on?

No response

Kubernetes Dashboard version

2.5.1 and 2.6.1

Kubernetes version

1.23 and 1.22

Dev environment

No response

@liuqi-sun
Copy link
Author

I have found that the backend code of the master branch also has this problem, but I have not tested the latest version for this problem.
I saw that there was no corresponding release branch for the historical version, so I modified the pr based on v2.6.1 on a new branch, and the new branch name was v2.6.1-patch

@liuqi-sun
Copy link
Author

I tested this issue with postman in release-7.10.0 and the problem persisted.
The test API body is as follows:
{"name":"","namespace":"_all","content":"apiVersion: k8s.tmlake.com/v1\nkind: VirtualServer\nmetadata:\n name: test-vs-http\nspec:\n resourceClassName: dev1\n partitionName: k8s-adc\n name: httpvs\n ipType: ipv4\n vip: 0.0.0.0:456\n httpProfileName: test-hp\n aclProfileName: test-ap\n enable: \"on\"\n protocol: smart-http\n natName: [\"default\", \"n1\"]\n natRules:\n - name: n1\n desc: \"n1 desc\"\n - name: n2\n desc: \"n2 desc\"\n toSrcType: ip_pool\n ipPool:\n method: conn_rr\n bindingVlanName: vlan_ha\n snatIp:\n - 192.168.80.1-192.168.80.255\n - 192.168.56.1-192.168.56.255\n snatIpv6:\n - fe80::2291:1dcc:1ccb:f5ea-fe80::2291:1dcc:1ccb:ffff\n srcVlan:\n - vlanName: vlan_ha\n - vlanName: vlan_192\n - vlanName: vlan_172\n pool:\n name: tcppool\n service: productpage\n portNumber: 9080\n lb: rr\n\n","validate":true}

Set namespace to "_all", and do not set the namespace field for content.metadata

@liuqi-sun
Copy link
Author

so I modified the pr based on 7.10.0 on a new branch, and the new branch name was 7.10.0-patch.

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.

1 participant