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

[feature request] Create STATIC_POD_PATH dir if not exists #460

Closed
adamzhoul opened this issue Sep 9, 2021 · 6 comments · Fixed by #473
Closed

[feature request] Create STATIC_POD_PATH dir if not exists #460

adamzhoul opened this issue Sep 9, 2021 · 6 comments · Fixed by #473
Assignees
Labels
kind/feature kind/feature

Comments

@adamzhoul
Copy link
Member

What would you like to be added:

When deploying yurtHub during RunConvertEdgeNode(), programs return when PodMainfestPath dir not exists.

if ok, err := enutil.DirExists(c.PodMainfestPath); !ok {

_, err = enutil.DirExists(c.PodMainfestPath)

What if we create that dir?

Why is this needed:

the static path may not always be created during installing ( yurtctl join not create that dir when i execute )
we don't know how users add the edge node in the first place.

  1. exits always leads to bad expirence
  2. dir missing is not a big deal if the user makes sure that's the right path.

others
/kind feature

@adamzhoul adamzhoul added the kind/feature kind/feature label Sep 9, 2021
@rambohe-ch
Copy link
Member

rambohe-ch commented Sep 10, 2021

@adamzhoul Because PodManifestPath will be used by kubelet component, so i think that PodManifestPath should be managed by kubelet instead of yurtctl. if yurtctl create new dir for PodManifestPath that kubelet does not use it, the new manifest dir can not work for static pod. so we can keep the current condition verification.

by the way, @Peeknut Do you have any comments for this feature request?

@adamzhoul
Copy link
Member Author

@rambohe-ch yes you are right, it's should not be yurtctl's responsbility.

But, what to do with the bad experience ? well, I encountered this.

follow the logic, yurtctl should get static path from kubelet config instead of --params.

  1. if the user passes the right dir. but dir does not exist, they have to create it themself, and they will.
  2. if the user passes the wrong dir.
    2.1 if the dir exists. yurtctl success, but kubelet does nothing. the user feels the program doesn't work but has no error log.
    2.2 if the dir does not exist. yurtctl exists with an error log. everyone happy.

besides, who is responsible for dir creation? kubelet ? kubeadm ?

@Peeknut
Copy link
Member

Peeknut commented Sep 10, 2021

Yes, maybe yurtctl get static path from kubelet config is better. As different nodes maybe has different kubelet staticPodPath, this cannot be handled by passing in parameters.
And after yurtctl get the staticPodPath, it can be created if it does not exist.

@Peeknut
Copy link
Member

Peeknut commented Sep 10, 2021

By the way, would you want to take over this issue and fix it?

@adamzhoul
Copy link
Member Author

By the way, would you want to take over this issue and fix it?

sure.

@adamzhoul
Copy link
Member Author

/assign @adamzhoul

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

Successfully merging a pull request may close this issue.

3 participants