Bug 1729535 - Attempting to re-run a deployment command throws 'unclosed file <_io.TextIOWrapper' warnings
Summary: Attempting to re-run a deployment command throws 'unclosed file <_io.TextIOWr...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-tripleoclient
Version: 15.0 (Stein)
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Harald Jensås
QA Contact: Sasha Smolyak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-12 14:30 UTC by Alexander Chuzhoy
Modified: 2020-03-05 11:59 UTC (History)
7 users (show)

Fixed In Version: python-tripleoclient-11.5.1-0.20190823060427.17079ab.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-05 11:59:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1836379 0 None None None 2019-07-12 14:33:12 UTC
OpenStack gerrit 670576 0 None MERGED Ensure files are closed, ensure no ResourceWarning on console 2020-02-03 16:06:29 UTC
Red Hat Product Errata RHBA-2020:0643 0 None None None 2020-03-05 11:59:48 UTC

Description Alexander Chuzhoy 2019-07-12 14:30:10 UTC
Environment:
openstack-tripleo-heat-templates-10.5.1-0.20190701110422.889d4d4.el8ost.noarch
python3-tripleoclient-11.4.1-0.20190705110410.14ae053.el8ost.noarch

Steps to reproduce:
Re-run a deployment command:
openstack overcloud deploy --templates \
--libvirt-type kvm \
-e /home/stack/templates/nodes_data.yaml \
-r /home/stack/templates/roles_data.yaml \
-n /home/stack/templates/network_data.yaml \
-e /home/stack/templates/extraconfig.yaml \
-e  /usr/share/openstack-tripleo-heat-templates/environments/ceph-ansible/ceph-ansible.yaml \
-e /home/stack/virt/internal.yaml \
-e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml \
-e /home/stack/virt/network/network-environment.yaml \
-e /home/stack/virt/network/dvr-override.yaml \
-e /usr/share/openstack-tripleo-heat-templates/environments/low-memory-usage.yaml \
-e /usr/share/openstack-tripleo-heat-templates/environments/ssl/tls-endpoints-public-ip.yaml \
-e /home/stack/virt/enable-tls.yaml \
-e /home/stack/virt/public_vip.yaml \
-e /home/stack/virt/inject-trust-anchor.yaml \
-e /home/stack/containers-prepare-parameter.yaml



Result:
/usr/lib/python3.6/site-packages/tripleoclient/utils.py:1888: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/stack/templates/nodes_data.yaml' mode='r' encoding='UTF-8'>
  content = yaml.load(open(env_file))
/usr/lib/python3.6/site-packages/tripleoclient/utils.py:1888: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/stack/templates/extraconfig.yaml' mode='r' encoding='UTF-8'>
  content = yaml.load(open(env_file))
/usr/lib/python3.6/site-packages/tripleoclient/utils.py:1888: ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/openstack-tripleo-heat-templates/environments/ceph-ansible/ceph-ansible.yaml' mode='r' encoding='UTF-8'>
  content = yaml.load(open(env_file))
/usr/lib/python3.6/site-packages/tripleoclient/utils.py:1888: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/stack/virt/internal.yaml' mode='r' encoding='UTF-8'>
  content = yaml.load(open(env_file))
/usr/lib/python3.6/site-packages/tripleoclient/utils.py:1888: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/stack/virt/network/network-environment.yaml' mode='r' encoding='UTF-8'>
  content = yaml.load(open(env_file))
/usr/lib/python3.6/site-packages/tripleoclient/utils.py:1888: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/stack/virt/network/dvr-override.yaml' mode='r' encoding='UTF-8'>
  content = yaml.load(open(env_file))
/usr/lib/python3.6/site-packages/tripleoclient/utils.py:1888: ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/openstack-tripleo-heat-templates/environments/low-memory-usage.yaml' mode='r' encoding='UTF-8'>
  content = yaml.load(open(env_file))
/usr/lib/python3.6/site-packages/tripleoclient/utils.py:1888: ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/share/openstack-tripleo-heat-templates/environments/ssl/tls-endpoints-public-ip.yaml' mode='r' encoding='UTF-8'>
  content = yaml.load(open(env_file))
/usr/lib/python3.6/site-packages/tripleoclient/utils.py:1888: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/stack/virt/enable-tls.yaml' mode='r' encoding='UTF-8'>
  content = yaml.load(open(env_file))
/usr/lib/python3.6/site-packages/tripleoclient/utils.py:1888: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/stack/virt/public_vip.yaml' mode='r' encoding='UTF-8'>
  content = yaml.load(open(env_file))
/usr/lib/python3.6/site-packages/tripleoclient/utils.py:1888: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/stack/virt/inject-trust-anchor.yaml' mode='r' encoding='UTF-8'>
  content = yaml.load(open(env_file))
/usr/lib/python3.6/site-packages/tripleoclient/utils.py:1888: ResourceWarning: unclosed file <_io.TextIOWrapper name='/home/stack/containers-prepare-parameter.yaml' mode='r' encoding='UTF-8'>
  content = yaml.load(open(env_file))
Removing the current plan files


The deployment then proceeds normally.

Comment 3 errata-xmlrpc 2020-03-05 11:59:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:0643


Note You need to log in before you can comment on or make changes to this bug.