warnings at every openstack command invocation

Bug #1934116 reported by Michele Baldessari
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Unassigned

Bug Description

Noticed today's master env that we get a wall of warnings at almost every openstack command. For example:
$ openstack overcloud node import --introspect --provide instackenv.json
A) fnmatch deprecation
/usr/lib/python3.6/site-packages/oslo_utils/fnmatch.py:25: DeprecationWarning: Using the oslo.utils's 'fnmatch' module is deprecated, please use the stdlib 'fnmatch' module.
  "Using the oslo.utils's 'fnmatch' module is deprecated, "

B) Barbican deprecation:
/usr/lib/python3.6/site-packages/barbicanclient/__init__.py:61: UserWarning: The secrets module is moved to barbicanclient/v1 directory, direct import of barbicanclient.secrets will be deprecated. Please import barbicanclient.v1.secrets instead.
  % (name, name, name))
/usr/lib/python3.6/site-packages/barbicanclient/__init__.py:61: UserWarning: The secrets module is moved to barbicanclient/v1 directory, direct import of barbicanclient.secrets will be deprecated. Please import barbicanclient.v1.secrets instead.
  % (name, name, name))

C) bootstrap deprecation
/usr/lib64/python3.6/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
  return f(*args, **kwds)
/usr/lib64/python3.6/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
  return f(*args, **kwds)
/usr/lib64/python3.6/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
  return f(*args, **kwds)
/usr/lib64/python3.6/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
  return f(*args, **kwds)
/usr/lib64/python3.6/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
  return f(*args, **kwds)
/usr/lib64/python3.6/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
  return f(*args, **kwds)
/usr/lib64/python3.6/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__

C) is the most annoying one because it is 124 lines at every invocation

This happens also with other commands like:
openstack baremetal node list

Revision history for this message
Michele Baldessari (michele) wrote :

There is also D) after a failed deployment:
/usr/lib/python3.6/site-packages/tripleoclient/v1/overcloud_deploy.py:587: ResourceWarning: unclosed <socket.socket fd=7, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('192.168.4.2', 39582), raddr=('192.168.4.2', 8006)>
  utils.launch_heat(self.heat_launcher, restore_db=restore_db)
/usr/lib/python3.6/site-packages/tripleoclient/utils.py:701: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/tripleo75a7apg8/7f34454e-90ff-4b83-acd1-a5676d5c8797/stdout' mode='r' encoding='UTF-8'>
  f.write(runner.stdout.read())
/usr/lib/python3.6/site-packages/tripleoclient/utils.py:701: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/tripleoc61x2pgo/7f34454e-90ff-4b83-acd1-a5676d5c8797/stdout' mode='r' encoding='UTF-8'>
  f.write(runner.stdout.read())
/usr/lib/python3.6/site-packages/tripleoclient/utils.py:701: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/tripleoniz3d3fl/7f34454e-90ff-4b83-acd1-a5676d5c8797/stdout' mode='r' encoding='UTF-8'>
  f.write(runner.stdout.read())
/usr/lib/python3.6/site-packages/tripleoclient/utils.py:701: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/tripleou2o1_bue/7f34454e-90ff-4b83-acd1-a5676d5c8797/stdout' mode='r' encoding='UTF-8'>
  f.write(runner.stdout.read())
/usr/lib/python3.6/site-packages/tripleoclient/utils.py:701: ResourceWarning: unclosed file <_io.TextIOWrapper name='/tmp/tripleoeo7aydfn/7f34454e-90ff-4b83-acd1-a5676d5c8797/stdout' mode='r' encoding='UTF-8'>
  f.write(runner.stdout.read())

Revision history for this message
yatin (yatinkarel) wrote :

https://review.opendev.org/c/openstack/oslo.utils/+/798804 should suppress most of the warnings(only explicit enabled will be shown) and https://review.opendev.org/c/openstack/osc-lib/+/798808 should close leftover of keystoneauth sessions. Would need new release for both.

osc-lib release:- https://review.opendev.org/c/openstack/releases/+/798520, for oslo.utils needs to request a release.

Changed in tripleo:
status: New → Triaged
milestone: none → xena-2
Changed in tripleo:
milestone: xena-2 → xena-3
Revision history for this message
yatin (yatinkarel) wrote :

oslo utils also released https://review.opendev.org/c/openstack/releases/+/800017 and is available in master current-tripleo https://trunk.rdoproject.org/centos8-master/component/common/current-tripleo/, closing it, if still see similar warning can re open.

Changed in tripleo:
status: Triaged → Fix Released
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.