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

add mdev.sh to hooks_lxc-mount.d #72

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

asac
Copy link
Contributor

@asac asac commented May 11, 2022

To use this put a mdev.json in your platform folder, e.g. for a container named "busy" you could do:

cat busy/mdev.json 
{
    "rules": [
        "hwrng 0:0 666 \u003epv/",
        "ebbchar 0:0 666 \u003epv/",
        ".* 0:0 000 !"
    ]
}

@asac asac force-pushed the feature/mdev-mount-hook branch from fa767c4 to 90bfee5 Compare May 11, 2022 15:19
@@ -0,0 +1,17 @@
#!/bin/sh

container_mdev=/storage/trails/current/$LXC_NAME/mdev.json
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thinking about appengine, are all these script going to work if stuff is no longer in /storage or in /lib/pv?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whats the best practice here? IMO we should path an env that folks can use to find the 'step" dir? what do we provide such hooks so they can do the right thing in appengine and here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we could set those variables from pantavisor that would be great

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to inject then special envs in lxccontainer with the important paths so the hooks can refer to those VARs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets add PV_STORAGE_DIR env

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets discuss :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now we use /storage as default for appengine. In the end is just about if we want to support a path different than /storage or if we want to support this feature in appengine too.

@asac asac force-pushed the feature/mdev-mount-hook branch from 3b664dc to 6b8f47f Compare May 17, 2022 14:57
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

Successfully merging this pull request may close these issues.

None yet

2 participants