kitchen-dokken icon indicating copy to clipboard operation
kitchen-dokken copied to clipboard

volumes from one suite are added to all subsequent suites

Open alice-sawatzky opened this issue 7 years ago • 2 comments

Summary

Adding a volume in one suite's driver config adds it to all the suites that follow it in .kitchen.yml.

Versions

  • test-kitchen: 1.20.0
  • kitchen-dokken: 2.6.7

Reproducing

Create the following .kitchen.yml in an empty directory and run kitchen create:

driver:
  name: dokken
provisioner:
  name: dokken
transport:
  name: dokken
platforms:
- name: alpine
  driver:
    image: alpine:latest
suites:
- name: suite1
- name: suite2
  driver:
    volumes:
    - suite2_vol:/vol:rw
- name: suite3
- name: suite4
  driver:
    volumes:
    - suite4_vol:/vol:rw

Expected Results

  • kitchen create executes successfully
  • the suite1-alpine container does not have any volumes mounted
  • the suite2-alpine container has the volume suite2_vol mounted at /vol
  • the suite3-alpine container does not have any volumes mounted
  • the suite4-alpine container has the volume suite4_vol mounted at /vol

Actual Results

  • kitchen create fails with the error message: Failed to complete #create action: [Duplicate mount point: /vol] on suite4-alpine
  • ✔️ the suite1-alpine container does not have any volumes mounted
  • ✔️ the suite2-alpine container has the volume suite2_vol mounted at /vol
  • the suite3-alpine container has the volume suite2_vol mounted at /vol
  • the suite4-alpine container doees not exist

alice-sawatzky avatar Apr 12 '18 01:04 alice-sawatzky

Additional note: If I run the suites one at a time, they work as expected.

alice-sawatzky avatar Apr 12 '18 19:04 alice-sawatzky

seeing similar behavior, have two suites defined, each with it's own volumes

- name: es7-node0
    driver:
      hostname: es7-node0
      ports:
        - 9270:9200
      volumes:
        - /tmp/yum_cache_el7/0:/var/cache/yum
- name: es7-node1
    driver:
      hostname: es7-node1
      ports:
        - 9271:9200
      volumes:
        - /tmp/yum_cache_el7/1:/var/cache/yum

getting exception when running test / converge on both kitchen converge es7-node*

>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>>     Failed to complete #create action: [Duplicate mount point: /var/cache/yum
] on es7-node1-centos-76
>>>>>> ----------------------

anapsix avatar Jul 12 '19 10:07 anapsix