fuel-devops 3.0.0 work only with local templates

Bug #1588319 reported by Artem Hrechanychenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Anton Studenov

Bug Description

Detailed bug description:

dos.py create-env /home/agrechanichenko/fuel-qa/system_test/tests_templates/tests_configs/centos_master_ceph_all_on_neutron_vlan.yaml
Traceback (most recent call last):
  File "/home/agrechanichenko/venv/bin/dos.py", line 22, in <module>
    main()
  File "/home/agrechanichenko/venv/local/lib/python2.7/site-packages/devops/shell.py", line 604, in main
    Shell(args).execute()
  File "/home/agrechanichenko/venv/local/lib/python2.7/site-packages/devops/shell.py", line 54, in execute
    self.commands.get(self.params.command)(self)
  File "/home/agrechanichenko/venv/local/lib/python2.7/site-packages/devops/shell.py", line 215, in do_create_env
    config = get_devops_config(self.params.env_config_name)
  File "/home/agrechanichenko/venv/local/lib/python2.7/site-packages/devops/helpers/templates.py", line 79, in get_devops_config
    return yaml_template_load(config_file)
  File "/home/agrechanichenko/venv/local/lib/python2.7/site-packages/devops/helpers/templates.py", line 67, in yaml_template_load
    return yaml.load(open(config_file))
  File "/home/agrechanichenko/venv/local/lib/python2.7/site-packages/yaml/__init__.py", line 71, in load
    return loader.get_single_data()
  File "/home/agrechanichenko/venv/local/lib/python2.7/site-packages/yaml/constructor.py", line 39, in get_single_data
    return self.construct_document(node)
  File "/home/agrechanichenko/venv/local/lib/python2.7/site-packages/yaml/constructor.py", line 48, in construct_document
    for dummy in generator:
  File "/home/agrechanichenko/venv/local/lib/python2.7/site-packages/yaml/constructor.py", line 398, in construct_yaml_map
    value = self.construct_mapping(node)
  File "/home/agrechanichenko/venv/local/lib/python2.7/site-packages/yaml/constructor.py", line 208, in construct_mapping
    return BaseConstructor.construct_mapping(self, node, deep=deep)
  File "/home/agrechanichenko/venv/local/lib/python2.7/site-packages/yaml/constructor.py", line 133, in construct_mapping
    value = self.construct_object(value_node, deep=deep)
  File "/home/agrechanichenko/venv/local/lib/python2.7/site-packages/yaml/constructor.py", line 88, in construct_object
    data = constructor(self, node)
  File "/home/agrechanichenko/venv/local/lib/python2.7/site-packages/devops/helpers/templates.py", line 31, in yaml_include
    "doesn't exist.".format(config_file, file_name))
ValueError: Cannot load the environment template /home/agrechanichenko/fuel-qa/system_test/tests_templates/tests_configs/centos_master_ceph_all_on_neutron_vlan.yaml : include file /home/agrechanichenko/fuel-qa/system_test/tests_templates/tests_configs/devops_configs/centos_master.yaml doesn't exist.

stat /home/agrechanichenko/fuel-qa/system_test/tests_templates/tests_configs/centos_master_ceph_all_on_neutron_vlan.yaml
  File: ‘/home/agrechanichenko/fuel-qa/system_test/tests_templates/tests_configs/centos_master_ceph_all_on_neutron_vlan.yaml’
  Size: 740 Blocks: 8 IO Block: 4096 regular file
Device: 10301h/66305d Inode: 236847802 Links: 1
Access: (0664/-rw-rw-r--) Uid: ( 1002/agrechanichenko) Gid: ( 1002/agrechanichenko)
Access: 2016-06-02 13:26:25.960581197 +0200
Modify: 2016-06-02 12:48:33.652660993 +0200
Change: 2016-06-02 12:48:33.652660993 +0200
 Birth: -

Steps to reproduce:
 dos.py create-env /path/to/template

Expected results:
env successfully created

Actual result:
cannot find template

Workaround:
locate template in fuel-devops/devops/templates

Impact:
-

Reproducibility:
fuel-devops 3.0.0

Revision history for this message
Artem Hrechanychenko (agrechanichenko) wrote :

Also directory with templates not present

venv) agrechanichenko@cz7322:~$ ls /home/agrechanichenko/venv/local/lib/python2.7/site-packages/devops/test
tests/ test_settings.py test_settings.pyc
(venv) agrechanichenko@cz7322:~$

Changed in fuel:
assignee: Fuel QA Team (fuel-qa) → Artem Grechanichenko (agrechanichenko)
status: New → Incomplete
Changed in fuel:
status: Incomplete → Confirmed
Revision history for this message
Artem Hrechanychenko (agrechanichenko) wrote :

Update:

1) need provide full path to external template $PWD/template
2) directory with fuel-devops templates devops/templates wasn't present in venv devops directory

Changed in fuel:
assignee: Artem Grechanichenko (agrechanichenko) → nobody
assignee: nobody → Fuel QA Team (fuel-qa)
Changed in fuel:
assignee: Fuel QA Team (fuel-qa) → Anton Studenov (astudenov)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-devops (master)

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

Changed in fuel:
assignee: Anton Studenov (astudenov) → Artem Grechanichenko (agrechanichenko)
Changed in fuel:
assignee: Artem Grechanichenko (agrechanichenko) → Anton Studenov (astudenov)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-devops (master)

Reviewed: https://review.openstack.org/327620
Committed: https://git.openstack.org/cgit/openstack/fuel-devops/commit/?id=b6bb6072336d39f4e996c64213b7bfa55aa34e7c
Submitter: Jenkins
Branch: master

commit b6bb6072336d39f4e996c64213b7bfa55aa34e7c
Author: Anton Studenov <email address hidden>
Date: Thu Jun 9 15:27:31 2016 +0300

    Allow full path to template for 'dos.py create-env' command

    - ValueErrors replaced with DevopsError in devops/helpers/templates.py
    - template files added to package

    Change-Id: I6a94862332b9c0806c128897b96c3bb24690d807
    Closes-bug: #1588319

Changed in fuel:
status: In Progress → Fix Committed
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.