coreos / torus

Torus Distributed Storage
https://coreos.com/blog/torus-distributed-storage-by-coreos.html
Apache License 2.0
1.77k stars 172 forks source link

Flex Volume failed to attach volume on Google Container Engine #434

Open azhuo-va opened 7 years ago

azhuo-va commented 7 years ago

Torus version: torus_v0.1.2_darwin_amd64

I want to try torus on Google Container Engine, so I followed the instruction here to set up everything. I was able to create torus volume, but I got stuck at step 6. I thought that was because torus's deriver wasn't installed on my kubernetes nodes. So I ssh into each node and ran these commands:

mkdir -p /usr/libexec/kubernetes/kubelet-plugins/volume/exec/coreos.com~torus/
wget https://github.com/coreos/torus/releases/download/v0.1.2/torus_v0.1.2_darwin_amd64.zip
unzip torus_v0.1.2_darwin_amd64.zip
cp torus_v0.1.2_darwin_amd64/torusblk /usr/libexec/kubernetes/kubelet-plugins/volume/exec/coreos.com~torus/torus
sudo /etc/init.d/kubelet restart
modprobe nbd nbds_max=32

Then I was told that dbus was missing, so I ran:

sudo apt-get update
sudo apt-get install dbus
sudo /etc/init.d/dbus restart

Then I re-tried step 6 but it failed again with the following reason:

I1213 22:26:12.879596   19183 kubelet.go:2534] SyncLoop (ADD, "api"): "postgres-torus-1327974524-gchf1_default(277bb2b1-c183-11e6-af49-42010a800003)"
I1213 22:26:12.947717   19183 reconciler.go:253] MountVolume operation started for volume "kubernetes.io/secret/default-token-w62uh" (spec.Name: "default-token-w62uh") to pod "277bb2b1-c183-11e6-af49-42010a800003" (UID: "277bb2b1-c183-11e6-af49-42010a800003"). 
I1213 22:26:12.947777   19183 reconciler.go:179] VerifyControllerAttachedVolume operation started for volume "coreos.com/torus/coreos.com/torus" (spec.Name: "data") pod "277bb2b1-c183-11e6-af49-42010a800003" (UID: "277bb2b1-c183-11e6-af49-42010a800003")
I1213 22:26:12.953321   19183 operation_executor.go:720] MountVolume.SetUp succeeded for volume "kubernetes.io/secret/default-token-w62uh" (spec.Name: "default-token-w62uh") pod "277bb2b1-c183-11e6-af49-42010a800003" (UID: "277bb2b1-c183-11e6-af49-42010a800003").
I1213 22:26:13.047988   19183 reconciler.go:253] MountVolume operation started for volume "coreos.com/torus/coreos.com/torus" (spec.Name: "data") to pod "277bb2b1-c183-11e6-af49-42010a800003" (UID: "277bb2b1-c183-11e6-af49-42010a800003"). 
E1213 22:26:13.066458   19183 goroutinemap.go:155] Operation for "coreos.com/torus/coreos.com/torus" failed. No retries permitted until 2016-12-13 22:26:13.566453387 +0000 UTC (durationBeforeRetry 500ms). error: MountVolume.SetUp failed for volume "coreos.com/torus/coreos.com/torus" (spec.Name: "data") pod "277bb2b1-c183-11e6-af49-42010a800003" (UID: "277bb2b1-c183-11e6-af49-42010a800003") with: attach command failed, status: Failure, reason: The name org.freedesktop.systemd1 was not provided by any .service files
I1213 22:26:13.649516   19183 reconciler.go:253] MountVolume operation started for volume "coreos.com/torus/coreos.com/torus" (spec.Name: "data") to pod "277bb2b1-c183-11e6-af49-42010a800003" (UID: "277bb2b1-c183-11e6-af49-42010a800003"). 
E1213 22:26:13.664908   19183 goroutinemap.go:155] Operation for "coreos.com/torus/coreos.com/torus" failed. No retries permitted until 2016-12-13 22:26:14.664901883 +0000 UTC (durationBeforeRetry 1s). error: MountVolume.SetUp failed for volume "coreos.com/torus/coreos.com/torus" (spec.Name: "data") pod "277bb2b1-c183-11e6-af49-42010a800003" (UID: "277bb2b1-c183-11e6-af49-42010a800003") with: attach command failed, status: Failure, reason: The name org.freedesktop.systemd1 was not provided by any .service files
I1213 22:26:14.756027   19183 reconciler.go:253] MountVolume operation started for volume "coreos.com/torus/coreos.com/torus" (spec.Name: "data") to pod "277bb2b1-c183-11e6-af49-42
010a800003" (UID: "277bb2b1-c183-11e6-af49-42010a800003"). 
E1213 22:26:14.771306   19183 goroutinemap.go:155] Operation for "coreos.com/torus/coreos.com/torus" failed. No retries permitted until 2016-12-13 22:26:16.771300335 +0000 UTC (dur
ationBeforeRetry 2s). error: MountVolume.SetUp failed for volume "coreos.com/torus/coreos.com/torus" (spec.Name: "data") pod "277bb2b1-c183-11e6-af49-42010a800003" (UID: "277bb2b1-
c183-11e6-af49-42010a800003") with: attach command failed, status: Failure, reason: The name org.freedesktop.systemd1 was not provided by any .service files
I1213 22:26:16.774367   19183 reconciler.go:253] MountVolume operation started for volume "coreos.com/torus/coreos.com/torus" (spec.Name: "data") to pod "277bb2b1-c183-11e6-af49-42
010a800003" (UID: "277bb2b1-c183-11e6-af49-42010a800003"). 
E1213 22:26:16.790067   19183 goroutinemap.go:155] Operation for "coreos.com/torus/coreos.com/torus" failed. No retries permitted until 2016-12-13 22:26:20.790061044 +0000 UTC (dur
ationBeforeRetry 4s). error: MountVolume.SetUp failed for volume "coreos.com/torus/coreos.com/torus" (spec.Name: "data") pod "277bb2b1-c183-11e6-af49-42010a800003" (UID: "277bb2b1-
c183-11e6-af49-42010a800003") with: attach command failed, status: Failure, reason: The name org.freedesktop.systemd1 was not provided by any .service files
I1213 22:26:20.889834   19183 reconciler.go:253] MountVolume operation started for volume "coreos.com/torus/coreos.com/torus" (spec.Name: "data") to pod "277bb2b1-c183-11e6-af49-42
010a800003" (UID: "277bb2b1-c183-11e6-af49-42010a800003"). 
E1213 22:26:20.905328   19183 goroutinemap.go:155] Operation for "coreos.com/torus/coreos.com/torus" failed. No retries permitted until 2016-12-13 22:26:28.905321172 +0000 UTC (dur
ationBeforeRetry 8s). error: MountVolume.SetUp failed for volume "coreos.com/torus/coreos.com/torus" (spec.Name: "data") pod "277bb2b1-c183-11e6-af49-42010a800003" (UID: "277bb2b1-
c183-11e6-af49-42010a800003") with: attach command failed, status: Failure, reason: The name org.freedesktop.systemd1 was not provided by any .service files
I1213 22:26:28.911182   19183 reconciler.go:253] MountVolume operation started for volume "coreos.com/torus/coreos.com/torus" (spec.Name: "data") to pod "277bb2b1-c183-11e6-af49-42
010a800003" (UID: "277bb2b1-c183-11e6-af49-42010a800003"). 
E1213 22:26:28.926574   19183 goroutinemap.go:155] Operation for "coreos.com/torus/coreos.com/torus" failed. No retries permitted until 2016-12-13 22:26:44.926567371 +0000 UTC (dur
ationBeforeRetry 16s). error: MountVolume.SetUp failed for volume "coreos.com/torus/coreos.com/torus" (spec.Name: "data") pod "277bb2b1-c183-11e6-af49-42010a800003" (UID: "277bb2b1
-c183-11e6-af49-42010a800003") with: attach command failed, status: Failure, reason: The name org.freedesktop.systemd1 was not provided by any .service files
I1213 22:26:44.956309   19183 reconciler.go:253] MountVolume operation started for volume "coreos.com/torus/coreos.com/torus" (spec.Name: "data") to pod "277bb2b1-c183-11e6-af49-42
010a800003" (UID: "277bb2b1-c183-11e6-af49-42010a800003"). 
E1213 22:26:44.971656   19183 goroutinemap.go:155] Operation for "coreos.com/torus/coreos.com/torus" failed. No retries permitted until 2016-12-13 22:27:16.971650496 +0000 UTC (dur
ationBeforeRetry 32s). error: MountVolume.SetUp failed for volume "coreos.com/torus/coreos.com/torus" (spec.Name: "data") pod "277bb2b1-c183-11e6-af49-42010a800003" (UID: "277bb2b1
-c183-11e6-af49-42010a800003") with: attach command failed, status: Failure, reason: The name org.freedesktop.systemd1 was not provided by any .service files
I1213 22:27:17.044740   19183 reconciler.go:253] MountVolume operation started for volume "coreos.com/torus/coreos.com/torus" (spec.Name: "data") to pod "277bb2b1-c183-11e6-af49-42
010a800003" (UID: "277bb2b1-c183-11e6-af49-42010a800003"). 
E1213 22:27:17.061294   19183 goroutinemap.go:155] Operation for "coreos.com/torus/coreos.com/torus" failed. No retries permitted until 2016-12-13 22:28:21.06128704 +0000 UTC (dura
tionBeforeRetry 1m4s). error: MountVolume.SetUp failed for volume "coreos.com/torus/coreos.com/torus" (spec.Name: "data") pod "277bb2b1-c183-11e6-af49-42010a800003" (UID: "277bb2b1
-c183-11e6-af49-42010a800003") with: attach command failed, status: Failure, reason: The name org.freedesktop.systemd1 was not provided by any .service files
E1213 22:28:12.880494   19183 kubelet.go:1930] Unable to mount volumes for pod "postgres-torus-1327974524-gchf1_default(277bb2b1-c183-11e6-af49-42010a800003)": timeout expired wait
ing for volumes to attach/mount for pod "postgres-torus-1327974524-gchf1"/"default". list of unattached/unmounted volumes=[data]; skipping pod
E1213 22:28:12.880566   19183 pod_workers.go:183] Error syncing pod 277bb2b1-c183-11e6-af49-42010a800003, skipping: timeout expired waiting for volumes to attach/mount for pod "pos
tgres-torus-1327974524-gchf1"/"default". list of unattached/unmounted volumes=[data]
I1213 22:28:21.129527   19183 reconciler.go:253] MountVolume operation started for volume "coreos.com/torus/coreos.com/torus" (spec.Name: "data") to pod "277bb2b1-c183-11e6-af49-42
010a800003" (UID: "277bb2b1-c183-11e6-af49-42010a800003"). 
E1213 22:28:21.144134   19183 goroutinemap.go:155] Operation for "coreos.com/torus/coreos.com/torus" failed. No retries permitted until 2016-12-13 22:30:21.144128534 +0000 UTC (dur
ationBeforeRetry 2m0s). error: MountVolume.SetUp failed for volume "coreos.com/torus/coreos.com/torus" (spec.Name: "data") pod "277bb2b1-c183-11e6-af49-42010a800003" (UID: "277bb2b
1-c183-11e6-af49-42010a800003") with: attach command failed, status: Failure, reason: The name org.freedesktop.systemd1 was not provided by any .service files
I1213 22:28:25.543083   19183 reconciler.go:253] MountVolume operation started for volume "kubernetes.io/secret/default-token-w62uh" (spec.Name: "default-token-w62uh") to pod "277b
b2b1-c183-11e6-af49-42010a800003" (UID: "277bb2b1-c183-11e6-af49-42010a800003"). Volume is already mounted to pod, but remount was requested.
I1213 22:28:25.546560   19183 operation_executor.go:720] MountVolume.SetUp succeeded for volume "kubernetes.io/secret/default-token-w62uh" (spec.Name: "default-token-w62uh") pod "2
77bb2b1-c183-11e6-af49-42010a800003" (UID: "277bb2b1-c183-11e6-af49-42010a800003").
nak3 commented 7 years ago

This host is running on systemd? FlexVolume doesn't support non-systemd system as below:

https://github.com/coreos/torus/tree/master/contrib/kubernetes#1-install-torustorusblk-in-kubelet-volume-plugin-directory

NOTICE: The FlexVolume functionality currently uses systemd to manage its lifecycle. Running as a FlexVolume on non-systemd systems is TBD

amitgilad3 commented 7 years ago

is torus going to work on google container engine any time soon???