Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

volumes from one suite are added to all subsequent suites #152

Open
alice-sawatzky opened this issue Apr 12, 2018 · 2 comments
Open

volumes from one suite are added to all subsequent suites #152

alice-sawatzky opened this issue Apr 12, 2018 · 2 comments
Labels

Comments

@alice-sawatzky
Copy link

alice-sawatzky commented Apr 12, 2018

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
Copy link
Author

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

@anapsix
Copy link

anapsix commented Jul 12, 2019

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
>>>>>> ----------------------

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants