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

Virtlet fix volume creation issues #66

Closed
vefimova opened this issue Oct 5, 2016 · 2 comments · Fixed by #199
Closed

Virtlet fix volume creation issues #66

vefimova opened this issue Oct 5, 2016 · 2 comments · Fixed by #199
Assignees

Comments

@vefimova
Copy link
Contributor

vefimova commented Oct 5, 2016

Virtlet crashes with following backtrace due to volume name is null:

virtlet_1  | panic: runtime error: invalid memory address or nil pointer dereference
virtlet_1  | [signal 0xb code=0x1 addr=0x0 pc=0x555201]
virtlet_1  |
virtlet_1  | goroutine 76 [running]:
virtlet_1  | panic(0xa3e720, 0xc820010080)
virtlet_1  |    /usr/lib/go-1.6/src/runtime/panic.go:481 +0x3e6
virtlet_1  | github.com/Mirantis/virtlet/pkg/libvirttools.(*VirtualizationTool).processVolumes(0xc8201ee450, 0xc82005a420, 0x1, 0x1, 0xc82005dc00, 0x3fc, 0x0, 0x0, 0x0, 0x0)
virtlet_1  |    /go/src/github.com/Mirantis/virtlet/pkg/libvirttools/virtualization.go:145 +0x481
virtlet_1  | github.com/Mirantis/virtlet/pkg/libvirttools.(*VirtualizationTool).CreateContainer(0xc8201ee450, 0xc82040a0c0, 0xc8203ccc40, 0x1e, 0x0, 0x0, 0x0, 0x0)
virtlet_1  |    /go/src/github.com/Mirantis/virtlet/pkg/libvirttools/virtualization.go:267 +0x289
virtlet_1  | github.com/Mirantis/virtlet/pkg/manager.(*VirtletManager).CreateContainer(0xc8201ee600, 0x7f01eb9a5758, 0xc82040a060, 0xc82040a0c0, 0x0, 0x0, 0x0)
virtlet_1  |    /go/src/github.com/Mirantis/virtlet/pkg/manager/manager.go:174 +0x151
virtlet_1  | github.com/Mirantis/virtlet/vendor/k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime._RuntimeService_CreateContainer_Handler(0xae4b40, 0xc8201ee600, 0x7f01eb9a5758, 0xc82040a060, 0xc8203ce0a0, 0x0, 0x0, 0x0, 0x0, 0x0)

In latest master Volume names were removed completly:
kubernetes/kubernetes#33970

@vefimova vefimova self-assigned this Oct 5, 2016
@vefimova
Copy link
Contributor Author

vefimova commented Oct 6, 2016

So now we need to generate volume names by our own. Need to check:

  • Volume name must be unique across host
  • Make a list of additional internal-usage volumes created by kubelet, what are they, what are they purposes, how to handle persistency if needed?

@vefimova vefimova changed the title Virtlet crashes with null pointer during creation volume Virtlet fix volume creation issues Oct 6, 2016
@vefimova
Copy link
Contributor Author

vefimova commented Nov 15, 2016

check workability using the following pod definition:

Pod specification:
apiVersion: v1
kind: Pod
metadata:
 name: test-vm-cirros
spec:
 containers:
 - name: test-vm-cirros
    image: download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
 volumeMounts:
  - mountPath: /test-dir-1
     name: test-volume-1
  - mountPath: /test-dir-2
     name: test-volume-2
volumes:
- name: test-volume-1
  hostPath:
    path: /var/lib/virtlet/volume1
- name: test-volume-2
  hostPath:
    path: /var/lib/virtlet/volume2
```text

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 a pull request may close this issue.

1 participant