Still observing close file warnings with overcloud commands

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

Bug Description

Seen via https://bugzilla.redhat.com/show_bug.cgi?id=1756855

~~~
(undercloud) [stack@undercloud ~]$ openstack overcloud generate fencing --ipmi-lanplus --ipmi-level administrator --output fencing.yaml instackenv.json
/usr/lib/python3.6/site-packages/osc_lib/shell.py:176: ResourceWarning: unclosed file <_io.TextIOWrapper name='fencing.yaml' mode='w' encoding='UTF-8'>
  ret_value = super(OpenStackShell, self).run_subcommand(argv)
/usr/lib/python3.6/site-packages/osc_lib/shell.py:176: ResourceWarning: unclosed file <_io.TextIOWrapper name='instackenv.json' mode='r' encoding='UTF-8'>
  ret_value = super(OpenStackShell, self).run_subcommand(argv)
sys:1: ResourceWarning: unclosed <ssl.SSLSocket fd=4, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.24.2', 45296), raddr=('192.168.24.2', 13000)>
sys:1: ResourceWarning: unclosed <ssl.SSLSocket fd=9, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.24.2', 54104), raddr=('192.168.24.2', 13989)>
~~~

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (master)

Fix proposed to branch: master
Review: https://review.opendev.org/685667

Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
Michele Baldessari (michele) wrote :
Changed in tripleo:
milestone: train-rc1 → ussuri-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (master)

Reviewed: https://review.opendev.org/685667
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=99a96ef416e04aaa133dfc5bd2f689e14e36354e
Submitter: Zuul
Branch: master

commit 99a96ef416e04aaa133dfc5bd2f689e14e36354e
Author: Michele Baldessari <email address hidden>
Date: Mon Sep 30 11:20:07 2019 +0200

    Close some file descriptors that were left open

    Before:
    (undercloud) [stack@undercloud-0 ~]$ openstack overcloud generate fencing --output fencetest.yaml instackenv.json
    /usr/lib/python3.6/site-packages/osc_lib/shell.py:176: ResourceWarning: unclosed file <_io.TextIOWrapper name='fencetest.yaml' mode='w' encoding='UTF-8'>
      ret_value = super(OpenStackShell, self).run_subcommand(argv)
    /usr/lib/python3.6/site-packages/osc_lib/shell.py:176: ResourceWarning: unclosed file <_io.TextIOWrapper name='instackenv.json' mode='r' encoding='UTF-8'>
      ret_value = super(OpenStackShell, self).run_subcommand(argv)
    sys:1: ResourceWarning: unclosed <ssl.SSLSocket fd=4, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.24.2', 56494), raddr=('192.168.24.2', 13000)>
    sys:1: ResourceWarning: unclosed <ssl.SSLSocket fd=9, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.24.2', 54102), raddr=('192.168.24.2', 13989)>

    After:
    (undercloud) [stack@undercloud-0 ~]$ openstack overcloud generate fencing --output fencetest.yaml instackenv.json
    sys:1: ResourceWarning: unclosed <ssl.SSLSocket fd=4, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.24.2', 47694), raddr=('192.168.24.2', 13000)>
    sys:1: ResourceWarning: unclosed <ssl.SSLSocket fd=8, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.24.2', 45306), raddr=('192.168.24.2', 13989)>

    Note that we also explicitly close an opened FileType in tripleoclient/v1/overcloud_execute.py
    as it was spotted while writing this review.

    NB: The SSL warnings will be investigated separately

    Change-Id: Ic8122ad1982deed0434d797a3fb0fba8512b27ab
    Closes-Bug: #1845927

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/686015

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (stable/stein)

Reviewed: https://review.opendev.org/686015
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=6df724aa5ced44a821bf6a2cfd85f3272f32b3aa
Submitter: Zuul
Branch: stable/stein

commit 6df724aa5ced44a821bf6a2cfd85f3272f32b3aa
Author: Michele Baldessari <email address hidden>
Date: Mon Sep 30 11:20:07 2019 +0200

    Close some file descriptors that were left open

    Before:
    (undercloud) [stack@undercloud-0 ~]$ openstack overcloud generate fencing --output fencetest.yaml instackenv.json
    /usr/lib/python3.6/site-packages/osc_lib/shell.py:176: ResourceWarning: unclosed file <_io.TextIOWrapper name='fencetest.yaml' mode='w' encoding='UTF-8'>
      ret_value = super(OpenStackShell, self).run_subcommand(argv)
    /usr/lib/python3.6/site-packages/osc_lib/shell.py:176: ResourceWarning: unclosed file <_io.TextIOWrapper name='instackenv.json' mode='r' encoding='UTF-8'>
      ret_value = super(OpenStackShell, self).run_subcommand(argv)
    sys:1: ResourceWarning: unclosed <ssl.SSLSocket fd=4, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.24.2', 56494), raddr=('192.168.24.2', 13000)>
    sys:1: ResourceWarning: unclosed <ssl.SSLSocket fd=9, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.24.2', 54102), raddr=('192.168.24.2', 13989)>

    After:
    (undercloud) [stack@undercloud-0 ~]$ openstack overcloud generate fencing --output fencetest.yaml instackenv.json
    sys:1: ResourceWarning: unclosed <ssl.SSLSocket fd=4, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.24.2', 47694), raddr=('192.168.24.2', 13000)>
    sys:1: ResourceWarning: unclosed <ssl.SSLSocket fd=8, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('192.168.24.2', 45306), raddr=('192.168.24.2', 13989)>

    Note that we also explicitly close an opened FileType in tripleoclient/v1/overcloud_execute.py
    as it was spotted while writing this review.

    NB: The SSL warnings will be investigated separately

    Change-Id: Ic8122ad1982deed0434d797a3fb0fba8512b27ab
    Closes-Bug: #1845927
    (cherry picked from commit 99a96ef416e04aaa133dfc5bd2f689e14e36354e)

tags: added: in-stable-stein
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 12.3.0

This issue was fixed in the openstack/python-tripleoclient 12.3.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 11.5.2

This issue was fixed in the openstack/python-tripleoclient 11.5.2 release.

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.