You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The userspace_bits fact is generated using platform.architecture.
platform.architecture uses sys.executable (as the first argument to platform.architecture) by default to determine the architecture.
sys.executable is the python interpreter and if this is a 32-bit binary, then userspace_bits report 32. Even if the underlying architecture of the OS is 64-bit.
$ uname -m -s -r -v -p -i
SunOS 5.10 Generic_147441-27 i86pc i386 i86pc
$ file /usr/bin/python
/usr/bin/python: ELF 32-bit LSB executable 80386 Version 1 [FPU], dynamically linked, not stripped, no debugging information available
$ isainfo -kv
64-bit amd64 kernel modules
Possible solutions
I have come up with a few solutions, though there are probably more:
Supply another executable as the first argument to platform.architecture. This will probably not work because it's hard to find a binary that exists on all platforms and that is linked to that platform's architecture.
Move away from platform.architecture and use system native methods to figure out the architecture (isainfo on SunOS, getconf on HPUX, etc.). This method will probably render more consistent results, but it has the disadvantage that you must take all sorts of variables into consideration (os types, os versions, releases, hardware architectures, etc.).
The text was updated successfully, but these errors were encountered:
I've changed the defect topic from "cannot be trusted" to "is incorrect", as this totally sounded like some kindof security issue, and it's not :)
Further, I don't think this is not a bug.
There are other facts for architecture (like 'ansible_architecture'), as this was added to detect that we were running a 32bit python on a 64 bit OS, so is working as designed, IMHO.
If you disagree, let's discuss on the ansible-devel list.
Also bump the version and add checksums, for when Ansible gets around to
supporting them.
This will install a 32- or 64-bit NDK based on the system's python version,
because Ansible: ansible/ansible#5510
* Expose internal_network in os_floating_ip
Shade project has finally exposed this argument so now this module
matches old quantum_floatingip module's capabilities.
Use "nat_destination" term instead of "internal_network" to match shade
terminology.
* Add (private|internal)_network aliases to os_floating_ip
* Fix typo in os_floating_ip
Ansible version: 1.4.3
Cause
userspace_bits
fact is generated usingplatform.architecture
.platform.architecture
usessys.executable
(as the first argument toplatform.architecture
) by default to determine the architecture.sys.executable
is the python interpreter and if this is a 32-bit binary, thenuserspace_bits
report 32. Even if the underlying architecture of the OS is 64-bit.Example
Ansible says:
On the server:
Possible solutions
I have come up with a few solutions, though there are probably more:
platform.architecture
. This will probably not work because it's hard to find a binary that exists on all platforms and that is linked to that platform's architecture.platform.architecture
and use system native methods to figure out the architecture (isainfo on SunOS, getconf on HPUX, etc.). This method will probably render more consistent results, but it has the disadvantage that you must take all sorts of variables into consideration (os types, os versions, releases, hardware architectures, etc.).The text was updated successfully, but these errors were encountered: