Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG
Environment:
printf "$(uname -srm)\n$(cat /etc/os-release)\n"):CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
ansible --version):Kubespray version (commit) (git rev-parse --short HEAD):
44de04b
Network plugin used: flannel
Copy of your inventory file: this is about inventory building
Command used to invoke ansible:
CONFIG_FILE=inventory/mktplcl/hosts.ini python3 contrib/inventory_builder/inventory.py ${IPS[@]}
Traceback (most recent call last):
File "contrib/inventory_builder/inventory.py", line 386, in
sys.exit(main())
File "contrib/inventory_builder/inventory.py", line 383, in main
KubesprayInventory(argv, CONFIG_FILE)
File "contrib/inventory_builder/inventory.py", line 76, in __init__
self.yaml_config = yaml.load(self.hosts_file)
File "/opt/rh/rh-python36/root/usr/lib64/python3.6/site-packages/ruamel/yaml/main.py", line 331, in load
return constructor.get_single_data()
File "/opt/rh/rh-python36/root/usr/lib64/python3.6/site-packages/ruamel/yaml/constructor.py", line 109, in get_single_data
node = self.composer.get_single_node()
File "/opt/rh/rh-python36/root/usr/lib64/python3.6/site-packages/ruamel/yaml/composer.py", line 87, in get_single_node
event.start_mark,
ruamel.yaml.composer.ComposerError: expected a single document in the stream
in "inventory/mktplcl/hosts.ini", line 4, column 1
but found another document
in "inventory/mktplcl/hosts.ini", line 15, column 1
Output of ansible run:
Anything else do we need to know:
@gvsphani
Please checkout v2.8.3 tag and check again
No more python problems with that tag version -- but did need to need ruamel.yaml. Shouldn't ruamel.yaml be in requirements.txt?
I've got the same issue under CentOS 7.
The checkout of v2.8.3 also solves this issue. Regression on the master branch?
not working on my ubuntu16.04.
ansible --version
ansible 2.7.9
python version = 2.7.12 (default, Nov 12 2018, 14:36:49) [GCC 5.4.0 20160609]
CONFIG_FILE=inventory/mycluster/hosts.ini python3 contrib/inventory_builder/inventory.py ${IPS[@]}
Traceback (most recent call last):
File "contrib/inventory_builder/inventory.py", line 391, in
sys.exit(main())
File "contrib/inventory_builder/inventory.py", line 388, in main
KubesprayInventory(argv, CONFIG_FILE)
File "contrib/inventory_builder/inventory.py", line 77, in __init__
self.yaml_config = yaml.load(self.hosts_file)
File "/usr/local/lib/python3.5/dist-packages/ruamel/yaml/main.py", line 331, in load
return constructor.get_single_data()
File "/usr/local/lib/python3.5/dist-packages/ruamel/yaml/constructor.py", line 109, in get_single_data
node = self.composer.get_single_node()
File "/usr/local/lib/python3.5/dist-packages/ruamel/yaml/composer.py", line 87, in get_single_node
event.start_mark,
ruamel.yaml.composer.ComposerError: expected a single document in the stream
in "inventory/mycluster/hosts.ini", line 4, column 1
but found another document
in "inventory/mycluster/hosts.ini", line 15, column 1
Is there a fix to this problem which does not require checking out a different version?
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close
@fejta-bot: Closing this issue.
In response to this:
Rotten issues close after 30d of inactivity.
Reopen the issue with/reopen.
Mark the issue as fresh with/remove-lifecycle rotten.Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
Most helpful comment
@gvsphani
Please checkout v2.8.3 tag and check again