Zun

Share volume within capsule

Bug #1787855 reported by hongbin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zun
Fix Released
High
hongbin

Bug Description

Create a capsule with a Cinder volume and two containers. The Cinder volume should be able to mounted into both containers. In other words, the following capsule should work:

$ cat capsule.yaml
capsuleVersion: beta
kind: capsule
metadata:
  name: init-demo
spec:
  restartPolicy: Never
  containers:
  - image: cirros
    command:
    - ls
    - /workdir/
    volumeMounts:
    - name: workdir
      mountPath: /workdir
  - image: cirros
    command:
    - touch
    - /workdir/hello
    volumeMounts:
    - name: workdir
      mountPath: /workdir
  volumes:
  - name: workdir
    cinder:
      size: 1

hongbin (hongbin034)
Changed in zun:
importance: Undecided → High
status: New → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to zun (master)

Fix proposed to branch: master
Review: https://review.openstack.org/593482

Changed in zun:
assignee: nobody → hongbin (hongbin034)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to zun (master)

Reviewed: https://review.openstack.org/599902
Committed: https://git.openstack.org/cgit/openstack/zun/commit/?id=0ac04cc1bfa91e03b3613aa559ca97c353bf186a
Submitter: Zuul
Branch: master

commit 0ac04cc1bfa91e03b3613aa559ca97c353bf186a
Author: Hongbin Lu <email address hidden>
Date: Wed Sep 5 03:15:52 2018 +0000

    Split volume_mapping table into two

    Split out volume_connection from volume_mapping table.
    * The volume_connection table will record information about a
      connection between a compute host and a cinder volume.
    * The volume_mapping table will record information about
      a mapping between a container and a local volume.

    We need this spliting to make the data model right. In particular,
    this will be a better data model for doing volume connect/disconnect,
    volume mounting/unmounting, and in the future, support sharing a
    local volume by multiple containers.

    Partial-Bug: #1787855
    Change-Id: I1dcc70e15a82e419398f4b4364ac6733d5990e28

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/593482
Committed: https://git.openstack.org/cgit/openstack/zun/commit/?id=04a186eddeccdf44c5740b3f9b690acb61dcf6a1
Submitter: Zuul
Branch: master

commit 04a186eddeccdf44c5740b3f9b690acb61dcf6a1
Author: Hongbin Lu <email address hidden>
Date: Mon Aug 20 04:16:24 2018 +0000

    Allow volume to be shared across capsule

    This allows a cinder volume to be shared by multiple containers
    that are in the same capsule. This is for supporting the use
    cases that multiple containers inside the capsule read/write
    to a shared storage.

    Change-Id: Ia7a14e52d03b50cfe19d8959e715ebc7f4c3f1d2
    Closes-Bug: #1787855

Changed in zun:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/zun 3.0.0.0rc1

This issue was fixed in the openstack/zun 3.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.