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

Some learnings / questions while building a CSI driver #5

Open
s4ke opened this issue Feb 12, 2023 · 4 comments
Open

Some learnings / questions while building a CSI driver #5

s4ke opened this issue Feb 12, 2023 · 4 comments

Comments

@s4ke
Copy link
Contributor

s4ke commented Feb 12, 2023

Leaving these here, so I can get some feedback if someone else stumbles across these:

Learnings:

  1. I can create volumes in the cluster without the plugin I refer to existing
  2. I can't delete volumes that are active calling docker volume rm
  3. I can drain a volume that is pending creation
  4. To debug plugins, nerdctl is useful to exec into the plugin container. You can list plugin containers with nerdctl ps --namespace plugins.moby
  5. To debug via logs (without filtering the docker engine log), you can change the entrypoint in the config.json to forward the logs to a file, then use nerdctl exec to exec into the container to get the logs
  "entrypoint": [
    "/bin/sh",
    "-c",
    "exec > /stdout 2> /stderr /plugin/aio.bin"
  ],
  1. All managers have to have the plugin installed (especially the leader) for CSI calls to work

Unsure if these are bugs:

  1. I can't delete a drained volume that is pending creation, I have to specify "-f"

Features that seem to be missing in the CSI support:

  1. Volume resizing (docker volume rm -f bypasses the plugin alltogether, useful for manual volume resizing - unclear if this is expected behaviour)
@s4ke
Copy link
Contributor Author

s4ke commented Feb 13, 2023

@olljanat maybe moving the discussion about debug logs here, as this is useful for others as well. Did you find a way to access the plugin logs besides forwarding them to a file like I did above?

If there is no better way, I am thinking about using the mounts section of the plugin config.json to mount log files and simply append to those. This will require some log rotation logic then...

@olljanat
Copy link
Owner

@s4ke if you don't forward logs anywhere they appear to docker engine own log.

@s4ke
Copy link
Contributor Author

s4ke commented Feb 13, 2023

Okay, this makes things easier then. I was under the impression that this didnt work this way, but this could have been a fluke due to debugging errors

@neersighted
Copy link

@s4ke if you don't forward logs anywhere they appear to docker engine own log.

I think I told you this in Discord as well 😆

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

No branches or pull requests

3 participants