How to deploy dysk.ko on a VM?
Closed this issue · 8 comments
andyzhangx commented
currently it's
cd module # or download location
sudo insmod dysk.ko
But after reboot, dysk.ko module will disappear, is there any better dysk deployment suggestion?
khenidak commented
docker run --rm -it --privileged -v /usr/src:/usr/src -v /lib/modules:/lib/modules khenidak/dysk-installer:1.0
more details here: https://github.com/khenidak/dysk/blob/master/docs/build-install.md
This is really designed to work kubernetes cluster nodes.
andyzhangx commented
@khenidak there is dysk installation error on my Ubuntu 16.04 VM:
azureuser@k8s-master-34763380-0:~$ uname -r
4.11.0-1015-azure
$ sudo docker run --rm \
> -it \
> --privileged \
> -v /usr/src:/usr/src \
> -v /lib/modules:/lib/modules \
> khenidak/dysk-installer:1.0
Unable to find image 'khenidak/dysk-installer:1.0' locally
1.0: Pulling from khenidak/dysk-installer
c2ca09a1934b: Pull complete
d6c3619d2153: Pull complete
0efe07335a04: Pull complete
6b1bb01b3a3b: Pull complete
43a98c187399: Pull complete
1415263ae9f9: Pull complete
654b338b00c7: Pull complete
Digest: sha256:6c44039fc334cd6aa396c9a574808fe0f3df0395c655d5c072e62ca1450de024
Status: Downloaded newer image for khenidak/dysk-installer:1.0
/etc/install_dysk.sh: line 56: cd: /tmp/6e14ea59a5404a8eb6e864485005f1b61a207ba0/dysk//module/: No such file or directory
modinfo: ERROR: Module dysk.ko not found.
INF: No dysk source found @ /tmp/6e14ea59a5404a8eb6e864485005f1b61a207ba0/dysk/ .. cloning
Cloning into 'dysk'...
remote: Counting objects: 234, done.
remote: Compressing objects: 100% (89/89), done.
remote: Total 234 (delta 65), reused 101 (delta 39), pack-reused 105
Receiving objects: 100% (234/234), 7.34 MiB | 0 bytes/s, done.
Resolving deltas: 100% (105/105), done.
Note: checking out '6e14ea59a5404a8eb6e864485005f1b61a207ba0'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 6e14ea5... AZ optimization: use slab for __reqstate __resstate objects and move it to GFP_NOIO
INF: /tmp/6e14ea59a5404a8eb6e864485005f1b61a207ba0/dysk//module/dysk.ko is not there, building it
make -C /lib/modules/4.11.0-1015-azure/build M=/tmp/6e14ea59a5404a8eb6e864485005f1b61a207ba0/dysk/module clean
make[1]: Entering directory '/usr/src/linux-headers-4.11.0-1015-azure'
make[1]: Leaving directory '/usr/src/linux-headers-4.11.0-1015-azure'
make -C /lib/modules/4.11.0-1015-azure/build/ M=/tmp/6e14ea59a5404a8eb6e864485005f1b61a207ba0/dysk/module modules
make[1]: Entering directory '/usr/src/linux-headers-4.11.0-1015-azure'
CC [M] /tmp/6e14ea59a5404a8eb6e864485005f1b61a207ba0/dysk/module/dysk_utils.o
CC [M] /tmp/6e14ea59a5404a8eb6e864485005f1b61a207ba0/dysk/module/dysk_worker.o
CC [M] /tmp/6e14ea59a5404a8eb6e864485005f1b61a207ba0/dysk/module/dysk_bdd.o
CC [M] /tmp/6e14ea59a5404a8eb6e864485005f1b61a207ba0/dysk/module/az.o
LD [M] /tmp/6e14ea59a5404a8eb6e864485005f1b61a207ba0/dysk/module/dysk.o
Building modules, stage 2.
MODPOST 1 modules
CC /tmp/6e14ea59a5404a8eb6e864485005f1b61a207ba0/dysk/module/dysk.mod.o
LD [M] /tmp/6e14ea59a5404a8eb6e864485005f1b61a207ba0/dysk/module/dysk.ko
make[1]: Leaving directory '/usr/src/linux-headers-4.11.0-1015-azure'
INF: installing dysk kernel module tag:6e14ea59a5404a8eb6e864485005f1b61a207ba0
modinfo: ERROR: Module dysk not found.
khenidak commented
Thanks Andy - what is your docker version?
Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: Andy Zhang <notifications@github.com>
Sent: Wednesday, January 10, 2018 9:34:24 PM
To: khenidak/dysk
Cc: Khaled Henidak (Kal); Mention
Subject: Re: [khenidak/dysk] How to deploy dysk.ko on a VM? (#10)
@khenidak<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkhenidak&data=02%7C01%7C%7C1b42ead7ecfd4b03bdaa08d558b4f9fc%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636512456662636958&sdata=yZLa%2FV7%2BWcIfsQfl7x7h22NUAjyAWS6CknfjkQcqQ60%3D&reserved=0> there is dysk installation error on my Ubuntu 16.04 VM:
azureuser@k8s-master-34763380-0:~$ uname -r
4.11.0-1015-azure
$ sudo docker run --rm \
-it \
--privileged \
-v /usr/src:/usr/src \
-v /lib/modules:/lib/modules \
khenidak/dysk-installer:1.0
Unable to find image 'khenidak/dysk-installer:1.0' locally
1.0: Pulling from khenidak/dysk-installer
c2ca09a1934b: Pull complete
d6c3619d2153: Pull complete
0efe07335a04: Pull complete
6b1bb01b3a3b: Pull complete
43a98c187399: Pull complete
1415263ae9f9: Pull complete
654b338b00c7: Pull complete
Digest: sha256:6c44039fc334cd6aa396c9a574808fe0f3df0395c655d5c072e62ca1450de024
Status: Downloaded newer image for khenidak/dysk-installer:1.0
/etc/install_dysk.sh: line 56: cd: /tmp/6e14ea59a5404a8eb6e864485005f1b61a207ba0/dysk//module/: No such file or directory
modinfo: ERROR: Module dysk.ko not found.
INF: No dysk source found @ /tmp/6e14ea59a5404a8eb6e864485005f1b61a207ba0/dysk/ .. cloning
Cloning into 'dysk'...
remote: Counting objects: 234, done.
remote: Compressing objects: 100% (89/89), done.
remote: Total 234 (delta 65), reused 101 (delta 39), pack-reused 105
Receiving objects: 100% (234/234), 7.34 MiB | 0 bytes/s, done.
Resolving deltas: 100% (105/105), done.
Note: checking out '6e14ea59a5404a8eb6e864485005f1b61a207ba0'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 6e14ea5... AZ optimization: use slab for __reqstate __resstate objects and move it to GFP_NOIO
INF: /tmp/6e14ea59a5404a8eb6e864485005f1b61a207ba0/dysk//module/dysk.ko is not there, building it
make -C /lib/modules/4.11.0-1015-azure/build M=/tmp/6e14ea59a5404a8eb6e864485005f1b61a207ba0/dysk/module clean
make[1]: Entering directory '/usr/src/linux-headers-4.11.0-1015-azure'
make[1]: Leaving directory '/usr/src/linux-headers-4.11.0-1015-azure'
make -C /lib/modules/4.11.0-1015-azure/build/ M=/tmp/6e14ea59a5404a8eb6e864485005f1b61a207ba0/dysk/module modules
make[1]: Entering directory '/usr/src/linux-headers-4.11.0-1015-azure'
CC [M] /tmp/6e14ea59a5404a8eb6e864485005f1b61a207ba0/dysk/module/dysk_utils.o
CC [M] /tmp/6e14ea59a5404a8eb6e864485005f1b61a207ba0/dysk/module/dysk_worker.o
CC [M] /tmp/6e14ea59a5404a8eb6e864485005f1b61a207ba0/dysk/module/dysk_bdd.o
CC [M] /tmp/6e14ea59a5404a8eb6e864485005f1b61a207ba0/dysk/module/az.o
LD [M] /tmp/6e14ea59a5404a8eb6e864485005f1b61a207ba0/dysk/module/dysk.o
Building modules, stage 2.
MODPOST 1 modules
CC /tmp/6e14ea59a5404a8eb6e864485005f1b61a207ba0/dysk/module/dysk.mod.o
LD [M] /tmp/6e14ea59a5404a8eb6e864485005f1b61a207ba0/dysk/module/dysk.ko
make[1]: Leaving directory '/usr/src/linux-headers-4.11.0-1015-azure'
INF: installing dysk kernel module tag:6e14ea59a5404a8eb6e864485005f1b61a207ba0
modinfo: ERROR: Module dysk not found.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkhenidak%2Fdysk%2Fissues%2F10%23issuecomment-356831132&data=02%7C01%7C%7C1b42ead7ecfd4b03bdaa08d558b4f9fc%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636512456662636958&sdata=9gfYlHld4ws3E0VkuRAde5KwujeMM55kFW5eiLvq5dU%3D&reserved=0>, or mute the thread<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKMDQ2VSmfhOubAp8yCOT1nwGX2XEoOMks5tJZ1ggaJpZM4RaPJE&data=02%7C01%7C%7C1b42ead7ecfd4b03bdaa08d558b4f9fc%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636512456662636958&sdata=m7cmhO2z4BB4n0j3wG6eeMfVgPNkKNMX7cLry6lw3E0%3D&reserved=0>.
andyzhangx commented
$ docker version
Client:
Version: 1.12.6
API version: 1.24
Go version: go1.6.4
Git commit: 78d1802
Built: Tue Jan 10 20:38:45 2017
OS/Arch: linux/amd64
Server:
Version: 1.12.6
API version: 1.24
Go version: go1.6.4
Git commit: 78d1802
Built: Tue Jan 10 20:38:45 2017
OS/Arch: linux/amd64
khenidak commented
This one is old :-) 1.17 CE works. I believe there was a bug w/ privileged containers in older versions.
Please try an upgrade if things work out I will add a note re versioning, if not I will debug this
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Andy Zhang <notifications@github.com>
Sent: Wednesday, January 10, 2018 9:45:45 PM
To: khenidak/dysk
Cc: Khaled Henidak (Kal); Mention
Subject: Re: [khenidak/dysk] How to deploy dysk.ko on a VM? (#10)
$ docker version Client: Version: 1.12.6 API version: 1.24 Go version: go1.6.4 Git commit: 78d1802 Built: Tue Jan 10 20:38:45 2017 OS/Arch: linux/amd64 Server: Version: 1.12.6 API version: 1.24 Go version: go1.6.4 Git commit: 78d1802 Built: Tue Jan
10 20:38:45 2017 OS/Arch: linux/amd64
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkhenidak%2Fdysk%2Fissues%2F10%23issuecomment-356832850&data=02%7C01%7C%7C2ce3134501734bfc97ac08d558b6904d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636512463481362801&sdata=JAS0TL75EAoSSq%2Fc7GuKM40dLvIDoXi7nXaEfCZDPCc%3D&reserved=0>, or mute the thread<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKMDQ5MMcmjpCAr6uHveJy1MT1R_701Iks5tJaAJgaJpZM4RaPJE&data=02%7C01%7C%7C2ce3134501734bfc97ac08d558b6904d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636512463481362801&sdata=XDIpVYbbIvOvN7MuyikyBqdofSlUzIF1s3ivCnf0w54%3D&reserved=0>.
andyzhangx commented
while the recently deployed k8s cluster VMs are all using 1.12.6
khenidak commented
Okay. Let us try to narrow the issue for docker based install. For Kubernetes if we can’t upgrade docker we will fall back to scriptable systemd+dkms approach. dkms works well on host
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Andy Zhang <notifications@github.com>
Sent: Wednesday, January 10, 2018 9:59:07 PM
To: khenidak/dysk
Cc: Khaled Henidak (Kal); Mention
Subject: Re: [khenidak/dysk] How to deploy dysk.ko on a VM? (#10)
while the recently deployed k8s cluster VMs are all using 1.12.6
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkhenidak%2Fdysk%2Fissues%2F10%23issuecomment-356834708&data=02%7C01%7C%7C3d5bf9d36d69493f860908d558b86ea0%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636512471508812360&sdata=JqEUV4czuuGRfwMKaWHalLIr%2FOpPhlDKlbbzShGQTyo%3D&reserved=0>, or mute the thread<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKMDQ6-19c_F0L4rkwTecTPSbZl5Djeqks5tJaMrgaJpZM4RaPJE&data=02%7C01%7C%7C3d5bf9d36d69493f860908d558b86ea0%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636512471508812360&sdata=wRID%2FdGtvObK5eZFFJ3tt3eiPmeI%2F1CF9JIk%2FAdSo8E%3D&reserved=0>.
khenidak commented
OK - yesterday, when i looked at this it was after a 16 work day. So i missed the fact that there was a bug in the script. This should work even on older versions of docker. please re-check (delete + re-pull the installer image please).