Please login or register. September 26, 2018, 01:13:53 AM

Author Topic: Cloud-Init on AIX - no RPMs needed  (Read 9248 times)

0 Members and 1 Guest are viewing this topic.

Michael

  • Administrator
  • Hero Member
  • *****
  • Posts: 1081
  • Karma: +0/-0
Re: Cloud-Init on AIX - no RPMs needed
« Reply #10 on: May 10, 2016, 08:07:43 AM »
And discover that
chmod -R o-rwx /var/httpd/htdocs
closes directories that are not owned by the group/user httpd/httpd.

Thanks for pointing this out.

p.s. Will be coming with a new and improved python real soon (python is also coming with a newer version).

Note: my (python) packaging does not include Tcl support. If you need that, let me know and I shall investigate packaging it separately.

Michael

  • Administrator
  • Hero Member
  • *****
  • Posts: 1081
  • Karma: +0/-0
Re: Cloud-Init on AIX - no RPMs needed
« Reply #11 on: May 10, 2016, 04:11:59 PM »
Found - HOW - it happened. New NAS settings had revoked all other settings - and there were a few that did not have the correct group setting.

Thanks again.

joeh

  • New Member
  • *
  • Posts: 3
  • Karma: +0/-0
Re: Cloud-Init on AIX - no RPMs needed
« Reply #12 on: August 10, 2016, 06:13:37 PM »
Hi, I tried to use the AIX cloud-init installer, seemed to install ok but i am getting these errors just trying to manually run cloud-init, are there other pre-reqs i am missing?

bash-4.3# ./cloud-init
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File "/opt/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/opt/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
  File "/opt/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/opt/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha1
ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
  File "/opt/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/opt/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha224
ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
  File "/opt/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/opt/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha256
ERROR:root:code for hash sha384 was not found.
Traceback (most recent call last):
  File "/opt/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/opt/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha384
ERROR:root:code for hash sha512 was not found.
Traceback (most recent call last):
  File "/opt/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/opt/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha512
Traceback (most recent call last):
  File "./cloud-init", line 4, in <module>
    __import__('pkg_resources').run_script('cloud-init==0.7.5', 'cloud-init')
  File "/opt/lib/python2.7/site-packages/setuptools-18.5-py2.7.egg/pkg_resources/__init__.py", line 742, in run_script
  File "/opt/lib/python2.7/site-packages/setuptools-18.5-py2.7.egg/pkg_resources/__init__.py", line 1667, in run_script
  File "/opt/lib/python2.7/site-packages/cloud_init-0.7.5-py2.7.egg/EGG-INFO/scripts/cloud-init", line 43, in <module>
    from cloudinit import netinfo
  File "/opt/lib/python2.7/site-packages/cloud_init-0.7.5-py2.7.egg/cloudinit/netinfo.py", line 23, in <module>
    import cloudinit.util as util
  File "/opt/lib/python2.7/site-packages/cloud_init-0.7.5-py2.7.egg/cloudinit/util.py", line 59, in <module>
    from cloudinit import url_helper
  File "/opt/lib/python2.7/site-packages/cloud_init-0.7.5-py2.7.egg/cloudinit/url_helper.py", line 27, in <module>
    import requests
  File "/opt/lib/python2.7/site-packages/requests/__init__.py", line 58, in <module>
    from . import utils
  File "/opt/lib/python2.7/site-packages/requests/utils.py", line 26, in <module>
    from .compat import parse_http_list as _parse_list_header
  File "/opt/lib/python2.7/site-packages/requests/compat.py", line 7, in <module>
    from .packages import chardet
  File "/opt/lib/python2.7/site-packages/requests/packages/__init__.py", line 29, in <module>
    import urllib3
ImportError: No module named urllib3

Michael

  • Administrator
  • Hero Member
  • *****
  • Posts: 1081
  • Karma: +0/-0
Re: Cloud-Init on AIX - no RPMs needed
« Reply #13 on: August 11, 2016, 03:55:17 PM »
Not sure what the issue is.

a) what level of AIX (oslevel -s).

b) what level of openssl is installed?

c) I have a newer version of python - I have not tested it with that (as I do not have a platform to test it with, sadly O only own POWER6 - so getting this packaged meant I needed some time with someone who had access to both POWERVC and POWER8 (although POWER7 will also work I expect).

FYI: I am nearly certain it does not work on AIX 5.3 - for many reasons. I did not worry as, afaik, POWERVC does not support AIX 5.3.

Lastly, I have learned "a bit" about python. Besides the "hash" problem - it is also not finding a module named urllib3(.py)(c).

Check both lslpp -f output for the urllib3.* files and I shall try, asap, to replicate your issue.

Michael

joeh

  • New Member
  • *
  • Posts: 3
  • Karma: +0/-0
Re: Cloud-Init on AIX - no RPMs needed
« Reply #14 on: August 11, 2016, 04:25:20 PM »
This was a fresh install of an older aix from an iso file

# oslevel -s
7100-02-02-1316
# lslpp -L | grep openssl
  openssl.base            0.9.8.2400    C     F    Open Secure Socket Layer
  openssl.license         0.9.8.2400    C     F    Open Secure Socket License
  openssl.man.en_US       0.9.8.2400    C     F    Open Secure Socket Layer
# lslpp -L | grep urllib3
#

# find / -name urllib* -print
/opt/lib/python2.7/site-packages/pip-7.1.2-py2.7.egg/pip/_vendor/requests/packages/urllib3
/opt/lib/python2.7/site-packages/requests/packages/urllib3
/opt/lib/python2.7/urllib.py
/opt/lib/python2.7/urllib.pyc
/opt/lib/python2.7/urllib.pyo
/opt/lib/python2.7/urllib2.py
/opt/lib/python2.7/urllib2.pyc
/opt/lib/python2.7/urllib2.pyo

Michael

  • Administrator
  • Hero Member
  • *****
  • Posts: 1081
  • Karma: +0/-0
Re: Cloud-Init on AIX - no RPMs needed
« Reply #15 on: August 11, 2016, 05:28:33 PM »
The problem is your openssl. It needs to be openssl.1.*

I am amazed at your level - considering that you have AIX 7.2 installed.

In any case: go to this link: https://www-01.ibm.com/marketing/iwm/iwm/web/reg/pick.do?source=aixbp&lang=en_US and get the latest OpenSSL - which today is: with FIPS support (as you have) is:
OpenSSL Install images v20.11.101.501 (OpenSSL 1.0.1e with OpenSSL FIPS 2.0.11) for AIX

OpenSSL Images openssl-fips-20.11.101.501.tar.Z  (30291653 B)

Readme Readme-20.11.101.501.txt  (13341 B)

There is also non-FIPS at level 1.0.2.X

That should fix it. I recall python was impossible to package with openssl-0.9.8.*

If it does not work, please let me know.

joeh

  • New Member
  • *
  • Posts: 3
  • Karma: +0/-0
Re: Cloud-Init on AIX - no RPMs needed
« Reply #16 on: August 12, 2016, 02:20:39 PM »
Michael, that was it, thanks for the quick turn-around!  I guess my one question is why did the installp complete successfully with the old openssl level?

Michael

  • Administrator
  • Hero Member
  • *****
  • Posts: 1081
  • Karma: +0/-0
Re: Cloud-Init on AIX - no RPMs needed
« Reply #17 on: August 15, 2016, 01:01:34 PM »
Because I did not check that your openssl was high enough - I assumed. My bad.

I shall update that with my next packaging - thx for the comment.
« Last Edit: August 16, 2016, 07:14:18 AM by Michael »

Michael

  • Administrator
  • Hero Member
  • *****
  • Posts: 1081
  • Karma: +0/-0
Re: Cloud-Init on AIX - no RPMs needed
« Reply #18 on: September 07, 2016, 06:47:18 PM »
Cloud-init now has it's own page in the aixtools wiki style info: See: http://www.aixtools.net/index.php/cloudinit for the latest bundle.