Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
.`fence_compute` and `fence_evacuate` agents now interpret `insecure` option in a more standard way
Previously, the `fence_compute` and `fence_evacuate` agents worked as if `--insecure` was specified by default. With this update, customers who do not use valid certificates for their compute or evacuate services must set `insecure=true` and use the `--insecure` option when running manually from the CLI. This is consistent with the behavior of all other agents.
DescriptionMichele Baldessari
2020-05-03 19:16:48 UTC
urrently fence_compute's --insecure option has the exact opposite effect of what it is meant.
The help page states:
--insecure Explicitly allow agent to perform "insecure" TLS
(https) requests
Which assumes that when we do not specify it we make secure requests. Which is not the case:
[root@database-2 ~]# /usr/sbin/fence_compute -o list --auth-url=https://overcloud.redhat.local:13000 --username=admin --password=$(hiera -c /etc/puppet/hiera.yaml keystone::admin_password) --domain=redhat.local --project-domain=Default --user-domain=Default --region-name=regionOne --tenant-name=admin
/usr/lib/python3.6/site-packages/urllib3/connectionpool.py:847: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/adva
nced-usage.html#ssl-warnings
InsecureRequestWarning)
...
compute-0.redhat.local,
compute-0,
compute-1.redhat.local,
compute-1,
The reason for this is that when we do *not* specify --insecure, then options['--insecure'] is set to the
string 'False' and when we pass "verify=(not options['--insecure'])" to the keystone session class,
we basically always pass the False boolean value (because not of a string is always False).
Whereas when we do specify --insecure then options['--insecure'] is set to the empty string
which becomes the True bool value when passing verify==(not options['--insecure']).
This is all the exact opposite of what we want.
Before the patch:
[root@database-2 ~]# /usr/sbin/fence_compute -o list --auth-url=https://overcloud.redhat.local:13000 --username=admin --password=$(hiera -c /etc/puppet/hiera.yaml keystone::admin_password) --domain=redhat.local --project-domain=Default --user-domain=Default --region-name=regionOne --tenant-name=admin --insecure
compute-0.redhat.local,
compute-0,
compute-1.redhat.local,
compute-1,
[root@database-2 ~]# /usr/sbin/fence_compute -o list --auth-url=https://overcloud.redhat.local:13000 --username=admin --password=$(hiera -c /etc/puppet/hiera.yaml keystone::admin_password) --domain=redhat.local --project-domain=Default --user-domain=Default --region-name=regionOne --tenant-name=admin
/usr/lib/python3.6/site-packages/urllib3/connectionpool.py:847: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecureRequestWarning)
...
compute-0.redhat.local,
compute-0,
compute-1.redhat.local,
compute-1,
After the patch:
[root@database-2 ~]# ./test -o list --auth-url=https://overcloud.redhat.local:13000 --username=admin --password=$(hiera -c /etc/puppet/hiera.yaml keystone::admin_password) --domain=redhat.local --project-domain=Default --user-domain=Default --region-name=regionOne --tenant-name=admin
compute-0.redhat.local,
compute-0,
compute-1.redhat.local,
compute-1,
[root@database-2 ~]# ./test -o list --auth-url=https://overcloud.redhat.local:13000 --username=admin --password=$(hiera -c /etc/puppet/hiera.yaml keystone::admin_password) --domain=redhat.local --project-domain=Default --user-domain=Default --region-name=regionOne --tenant-name=admin --insecure
/usr/lib/python3.6/site-packages/urllib3/connectionpool.py:847: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecureRequestWarning)
...
compute-0.redhat.local,
compute-0,
compute-1.redhat.local,
compute-1,
[root@database-2 ~]# diff -u /usr/sbin/fence_compute test
--- /usr/sbin/fence_compute 2020-02-13 15:15:09.000000000 +0000
+++ test 2020-05-03 18:19:57.923253223 +0000
@@ -281,7 +281,13 @@
loader = loading.get_plugin_loader('password')
keystone_auth = loader.load_from_options(**kwargs)
- keystone_session = session.Session(auth=keystone_auth, verify=(not options["--insecure"]))
+ verify_tls = True
+ # When --insecure is not specified the value is the string 'False'
+ # Otherwise when it is added to the command line the option is set to ''
+ if options['--insecure'].lower().strip() in ['', 'true']:
+ verify_tls = False
+
+ keystone_session = session.Session(auth=keystone_auth, verify=verify_tls)
nova_versions = [ "2.11", "2" ]
for version in nova_versions:
Comment 4Oyvind Albrigtsen
2020-05-12 07:08:19 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 (fence-agents bug fix and enhancement update), 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:4622
urrently fence_compute's --insecure option has the exact opposite effect of what it is meant. The help page states: --insecure Explicitly allow agent to perform "insecure" TLS (https) requests Which assumes that when we do not specify it we make secure requests. Which is not the case: [root@database-2 ~]# /usr/sbin/fence_compute -o list --auth-url=https://overcloud.redhat.local:13000 --username=admin --password=$(hiera -c /etc/puppet/hiera.yaml keystone::admin_password) --domain=redhat.local --project-domain=Default --user-domain=Default --region-name=regionOne --tenant-name=admin /usr/lib/python3.6/site-packages/urllib3/connectionpool.py:847: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/adva nced-usage.html#ssl-warnings InsecureRequestWarning) ... compute-0.redhat.local, compute-0, compute-1.redhat.local, compute-1, The reason for this is that when we do *not* specify --insecure, then options['--insecure'] is set to the string 'False' and when we pass "verify=(not options['--insecure'])" to the keystone session class, we basically always pass the False boolean value (because not of a string is always False). Whereas when we do specify --insecure then options['--insecure'] is set to the empty string which becomes the True bool value when passing verify==(not options['--insecure']). This is all the exact opposite of what we want. Before the patch: [root@database-2 ~]# /usr/sbin/fence_compute -o list --auth-url=https://overcloud.redhat.local:13000 --username=admin --password=$(hiera -c /etc/puppet/hiera.yaml keystone::admin_password) --domain=redhat.local --project-domain=Default --user-domain=Default --region-name=regionOne --tenant-name=admin --insecure compute-0.redhat.local, compute-0, compute-1.redhat.local, compute-1, [root@database-2 ~]# /usr/sbin/fence_compute -o list --auth-url=https://overcloud.redhat.local:13000 --username=admin --password=$(hiera -c /etc/puppet/hiera.yaml keystone::admin_password) --domain=redhat.local --project-domain=Default --user-domain=Default --region-name=regionOne --tenant-name=admin /usr/lib/python3.6/site-packages/urllib3/connectionpool.py:847: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecureRequestWarning) ... compute-0.redhat.local, compute-0, compute-1.redhat.local, compute-1, After the patch: [root@database-2 ~]# ./test -o list --auth-url=https://overcloud.redhat.local:13000 --username=admin --password=$(hiera -c /etc/puppet/hiera.yaml keystone::admin_password) --domain=redhat.local --project-domain=Default --user-domain=Default --region-name=regionOne --tenant-name=admin compute-0.redhat.local, compute-0, compute-1.redhat.local, compute-1, [root@database-2 ~]# ./test -o list --auth-url=https://overcloud.redhat.local:13000 --username=admin --password=$(hiera -c /etc/puppet/hiera.yaml keystone::admin_password) --domain=redhat.local --project-domain=Default --user-domain=Default --region-name=regionOne --tenant-name=admin --insecure /usr/lib/python3.6/site-packages/urllib3/connectionpool.py:847: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecureRequestWarning) ... compute-0.redhat.local, compute-0, compute-1.redhat.local, compute-1, [root@database-2 ~]# diff -u /usr/sbin/fence_compute test --- /usr/sbin/fence_compute 2020-02-13 15:15:09.000000000 +0000 +++ test 2020-05-03 18:19:57.923253223 +0000 @@ -281,7 +281,13 @@ loader = loading.get_plugin_loader('password') keystone_auth = loader.load_from_options(**kwargs) - keystone_session = session.Session(auth=keystone_auth, verify=(not options["--insecure"])) + verify_tls = True + # When --insecure is not specified the value is the string 'False' + # Otherwise when it is added to the command line the option is set to '' + if options['--insecure'].lower().strip() in ['', 'true']: + verify_tls = False + + keystone_session = session.Session(auth=keystone_auth, verify=verify_tls) nova_versions = [ "2.11", "2" ] for version in nova_versions: