Future minion support on AIX operating system

1,495 views
Skip to first unread message

Robert Murley

unread,
Aug 5, 2013, 11:40:50 PM8/5/13
to salt-...@googlegroups.com
I have been playing around with Salt 0.16.x setup within a Python 2.7 virtualenv on AIX 6.1 and 7.1 operating systems.  I know that the Salt Stack Roadmap documented at URL (https://salt.readthedocs.org/en/v0.9.8/topics/roadmap/index.html#) indicates that 2.0.0 would add support for more platforms such as AIX.  I was wondering what the latest is for AIX support at the minion level first and possibly a master second.  I can successfully install the salt source from GitHub and start the salt-minion or salt-master on AIX.  My current setup is running salt-master on a Ubuntu 12.10 server with salt-minion running on AIX 6.1 and 7.1 servers.  The salt-master will accept the minion keys and authentication request from them, but then the minion stops (coredump) after "[DEBUG   ] Decrypting the current master AES key" is reached.  

I know that AIX isn't officially supported at this time as a minion for any of the 0.16.x versions and wasn't sure what the latest roadmap or target date was regarding the AIX operating system.  I would be interested in working with the SaltStack folks on a working AIX minion if there is an interest in doing so at this time.  Please let me know about the current status of using AIX as a minion along with any joint collaboration effort to do so.


Best Regards,

Robert Murley

Colton Myers

unread,
Aug 6, 2013, 4:09:53 PM8/6/13
to salt-...@googlegroups.com
I haven't heard much (if any) talk of AIX recently.  The doc you linked to is quite old -- our current roadmap is not as well-documented.

That said, it would be cool to get Salt running properly on AIX.  The biggest problem that I foresee is lack of access to AIX systems.  (I also know basically nothing about AIX, another problem.)

If you wanted to work on getting the minion working on AIX, we would be happy to help you in whatever way we can.

--
Colton Myers



--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

David Boucha

unread,
Aug 6, 2013, 4:27:47 PM8/6/13
to salt users list
Robert,

Yeah, we'd love to get Salt working on AIX!  We would definitely work with you to get the minion running. Let me know when you have a few minutes to get started.

Thanks for reaching out to us.

Talk to you soon.

Dave Boucha


On Mon, Aug 5, 2013 at 9:40 PM, Robert Murley <rdmu...@gmail.com> wrote:

--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Dave Boucha  |  Sr. Engineer


5272 South College Drive, Suite 301 | Murray, UT 84123

office 801-305-3563
da...@saltstack.com | www.saltstack.com

Robert Murley

unread,
Aug 6, 2013, 6:04:39 PM8/6/13
to salt-...@googlegroups.com
Colton and David,

Thanks for the reply on this subject matter.  I would like to work further with you in seeing this AIX minion scenario through.  First I think it would be good to explain why I'm looking at SaltStack on AIX and what I was trying to achieve with it.

I currently use a home grown combination of Python and shell scripts with SSH connectivity for automating installations and admin/support procedures across different servers within the enterprise.  I was looking to use a SaltStack approach for this with greater flexibility and having more options.  I use a non-root dedicated AIX system user ID such as wsadmin for example to install and manage all of the middleware software running on a particular AIX server.  This non-root user will have full control and ownership of the file systems that are used by it so there isn't any need for root access once the file systems are created and assigned (owned) by the dedicated system user.  This system user has access to a software repository where the middleware binary installations reside for installation purposes along with any software maintenance updates/patches.  I have been running Salt master and minion as a non-root user and see that it's supported as well where you need to specify the configuration file location option (-c <path>) with the Salt commands.  

What steps and information would you want to see from my AIX server where I'm running a minion within a Python virtualenv?  My thoughts on the next steps are the following below:

(After a fresh install of Salt master 0.16.2 on Ubuntu 12.10 and a fresh install of Salt minion 0.16.2 on AIX 7.1 running as a non-root user)

1. Show the virtualenv setup (directory structure) on AIX
2. Show the installed packages (pip list) on AIX
3. Provide the Salt minion configuration file being used on AIX
4. Provide the Salt master configuration file being used on Ubuntu
5. Startup fresh install of Salt master on Ubuntu in debug mode (salt-master -c ./etc/salt -l debug)
6. Startup fresh install of Salt minion on AIX in debug mode (salt-minion -c ./etc/salt -l debug)
7. Accept minion key on master (salt-key -c ./etc/salt -A)
8. List keys on master (salt-key -c ./etc/salt -L)
9. Monitor master debug output and provide afterwards
10. Monitor minion debug output and provide afterwards
11. Also provide the minion Illegal instruction(coredump) that happens after the "[DEBUG  ] Decrypting the current master AES key" step is reached as I originally documented

As far as access to an AIX 7.1 server goes I might be able to get temporary access for the SaltStack team to further debug if possible.  Please let me know if what I stated above is different from what you are expecting or need to move forward with me on this.  

Best Regards,

Robert Murley

David Boucha

unread,
Aug 6, 2013, 7:06:16 PM8/6/13
to salt users list
Have you gotten all the Salt dependencies installed?



--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Robert Murley

unread,
Aug 7, 2013, 4:46:45 PM8/7/13
to salt-...@googlegroups.com
David,

The dependencies described below have been met

DEPENDENCIES

Salt should run on any Unix-like platform so long as the dependencies are met.

  • Python 2.6 >= 2.6 <3.0
  • ZeroMQ >= 2.1.9
  • pyzmq >= 2.1.9 - ZeroMQ Python bindings
  • PyCrypto - The Python cryptography toolkit
  • msgpack-python - High-performance message interchange format
  • YAML - Python YAML bindings
  • Jinja2 - parsing Salt States (configurable in the master settings)

AIX 7.1 64-bit Server minion host

(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin
$ pip list
Jinja2 (2.7)
M2Crypto (0.21.1)
MarkupSafe (0.18)
msgpack-python (0.3.0)
pip (1.4)
pycrypto (2.6)
PyYAML (3.10)
pyzmq (13.1.0)
salt (0.16.2)
setuptools (0.9.7)
wsgiref (0.1.2)
(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin


I'm using the latest salt 0.16.2 version and wsadmin is the non-root AIX system user ID that is running minion.  The Python 2.7 virtualenv root dir is /apps/Tools/saltstack-wsadmin as you can see above.  The ZeroMQ 3.2.2 library has been compiled and installed for AIX 7.1 locally in the virtualenv shown below

(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin
$ ls
bin      etc      include  lib      share    tmp      var  
(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin 
$ ls -latr lib
total 16264
drwxr-xr-x    2 wsadmin  wsadmin         256 Jul 31 14:11 pkgconfig
-rwxr-xr-x    1 wsadmin  wsadmin        1002 Jul 31 14:11 libzmq.la
-rwxr-xr-x    1 wsadmin  wsadmin     8315720 Jul 31 14:11 libzmq.a
drwxr-xr-x    4 wsadmin  wsadmin         256 Jul 31 14:11 .
drwxr-xr-x    4 wsadmin  wsadmin        4096 Aug  2 15:34 python2.7
drwxr-xr-x    9 wsadmin  wsadmin         256 Aug  7 09:22 ..
(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin



Also, the var, tmp and etc directories used by Salt reside locally within the virtualenv shown below

(saltstack-wsadmin)wsadmin@aixda051:/apps/Tools/saltstack-wsadmin
$ ls -altr
total 8
drwxr-xr-x    3 wsadmin  wsadmin         256 Jul 31 14:11 share
drwxr-xr-x    4 wsadmin  wsadmin         256 Jul 31 14:11 lib
drwxr-xr-x    2 wsadmin  wsadmin         256 Jul 31 14:11 include
drwxr-xr-x    2 wsadmin  wsadmin        4096 Jul 31 14:17 bin
drwxr-xr-x    6 wsadmin  wsadmin         256 Aug  2 15:34 ..
drwxr-xr-x    3 wsadmin  wsadmin         256 Aug  2 15:37 etc
drwxr-xr-x    3 wsadmin  wsadmin         256 Aug  2 15:37 tmp
drwxr-xr-x    5 wsadmin  wsadmin         256 Aug  2 15:37 var
drwxr-xr-x    9 wsadmin  wsadmin         256 Aug  2 15:37 .
(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin
$


Ubuntu 12.10 64-bit Server master host

(saltstack-wsadmin)wsadmin@ubuntu-saltsvr1:/apps/Tools/saltstack-wsadmin$ pip list
argparse (1.2.1)
Jinja2 (2.7.1)
M2Crypto (0.21.1)
MarkupSafe (0.18)
msgpack-python (0.3.0)
pip (1.4)
pycrypto (2.6)
PyYAML (3.10)
pyzmq (13.1.0)
salt (0.16.2)
setuptools (0.9.8)
wsgiref (0.1.2)
(saltstack-wsadmin)wsadmin@ubuntu-saltsvr1:/apps/Tools/saltstack-wsadmin


I'm using the latest salt 0.16.2 version and wsadmin is the non-root Ubuntu system user ID that is running master.  The Python 2.7 virtualenv root dir is /apps/Tools/saltstack-wsadmin as you can see above.  The ZeroMQ 3.2.2 library has been compiled and installed for Ubuntu 12.10 locally in the virtualenv shown below

(saltstack-wsadmin)wsadmin@ubuntu-saltsvr1:/apps/Tools/saltstack-wsadmin$ ls
bin  etc  include  lib  local  share  tmp  var 
(saltstack-wsadmin)wsadmin@ubuntu-saltsvr1:/apps/Tools/saltstack-wsadmin$ ls -atlr lib
total 9556
drwxrwxr-x  4 wsadmin wsadmin    4096 Aug  3 00:33 python2.7
-rwxr-xr-x  1 wsadmin wsadmin 2814363 Aug  3 02:28 libzmq.so.3.0.0
lrwxrwxrwx  1 wsadmin wsadmin      15 Aug  3 02:28 libzmq.so.3 -> libzmq.so.3.0.0
lrwxrwxrwx  1 wsadmin wsadmin      15 Aug  3 02:28 libzmq.so -> libzmq.so.3.0.0
-rwxr-xr-x  1 wsadmin wsadmin     966 Aug  3 02:28 libzmq.la
-rw-r--r--  1 wsadmin wsadmin 6946412 Aug  3 02:28 libzmq.a
drwxrwxr-x  4 wsadmin wsadmin    4096 Aug  3 02:28 .
drwxrwxr-x  2 wsadmin wsadmin    4096 Aug  3 02:28 pkgconfig
drwxr-xr-x 10 wsadmin wsadmin    4096 Aug  7 14:41 ..
(saltstack-wsadmin)wsadmin@ubuntu-saltsvr1:/apps/Tools/saltstack-wsadmin


Also, the var, tmp and etc directories used by Salt reside locally within the virtualenv shown below

(saltstack-wsadmin)wsadmin@ubuntu-saltsvr1:/apps/Tools/saltstack-wsadmin$ ls -altr
total 40
drwxr-xr-x  4 root    root    4096 Aug  3 00:31 ..
drwxrwxr-x  2 wsadmin wsadmin 4096 Aug  3 00:33 local
drwxrwxr-x  2 wsadmin wsadmin 4096 Aug  3 02:28 include
drwxrwxr-x  4 wsadmin wsadmin 4096 Aug  3 02:28 lib
drwxrwxr-x  3 wsadmin wsadmin 4096 Aug  3 02:28 share
drwxrwxr-x  3 wsadmin wsadmin 4096 Aug  3 03:09 etc
drwxrwxr-x  2 wsadmin wsadmin 4096 Aug  7 14:41 bin
drwxr-xr-x 10 wsadmin wsadmin 4096 Aug  7 14:41 .
drwxr-xr-x  4 wsadmin wsadmin 4096 Aug  7 15:21 tmp
drwxr-xr-x  6 wsadmin wsadmin 4096 Aug  7 15:21 var
(saltstack-wsadmin)wsadmin@ubuntu-saltsvr1:/apps/Tools/saltstack-wsadmin


This should answer your question about any Salt dependencies on the master and minion.  I will provide the debug output for the Ubuntu master startup and the AIX minion startup in my next post going through the process of accepting the minion key on the master and then the minion dying afterwards.  Please let me know if you have any additional questions or concerns about what I have posted above.


Best Regards,

Robert Murley


On Monday, August 5, 2013 11:40:50 PM UTC-4, Robert Murley wrote:

Robert Murley

unread,
Aug 7, 2013, 6:22:10 PM8/7/13
to salt-...@googlegroups.com

David,

Here is the debug output I promised in my earlier post

Ubuntu - Master startup in debug mode

 

(saltstack-wsadmin)wsadmin@ubuntu-saltsvr1:/apps/Tools/saltstack-wsadmin$ salt-master -c ./etc/salt -l debug 
[DEBUG   ] Reading configuration from /apps/Tools/saltstack-wsadmin/etc/salt/master 
[DEBUG   ] Configuration file path: /apps/Tools/saltstack-wsadmin/etc/salt/master 
[INFO    ] Setting up the Salt Master 
[DEBUG   ] Loaded master key: /apps/Tools/saltstack-wsadmin/etc/salt/pki/master.pem 
[INFO    ] Preparing the wsadmin key for local communication 
[DEBUG   ] Removing stale keyfile: /apps/Tools/saltstack-wsadmin/var/cache/salt/.wsadmin_key 
[DEBUG   ] Created pidfile: /apps/Tools/saltstack-wsadmin/var/run/salt-master.pid 
[DEBUG   ] Chowned pidfile: /apps/Tools/saltstack-wsadmin/var/run/salt-master.pid to user: wsadmin 
[DEBUG   ] loading fileserver in ['/apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/fileserver', '/apps/Tools/saltstack-wsadmin/local/lib/python2.7/site-packages/salt/fileserver'] 
[DEBUG   ] Skipping /apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/fileserver, it is not a directory 
[INFO    ] salt-master is starting as user 'wsadmin' 
[INFO    ] Current values for max open files soft/hard setting: 1024/4096 
[INFO    ] The value for the 'max_open_files' setting, 100000, is higher than what the user running salt is allowed to raise to, 4096. Defaulting to 4096. 
[INFO    ] Raising max open files value to 4096 
[INFO    ] New values for max open files soft/hard values: 4096/4096 
[INFO    ] Setting up the master communication server 
[INFO    ] Starting the Salt Publisher on tcp://0.0.0.0:4505 
[DEBUG   ] Reading configuration from /apps/Tools/saltstack-wsadmin/etc/salt/master 
[INFO    ] Starting Salt worker process 0 
[INFO    ] Starting Salt worker process 1 
[INFO    ] Starting Salt worker process 2 
[INFO    ] Starting Salt worker process 3 
[DEBUG   ] MasterEvent PUB socket URI: ipc:///apps/Tools/saltstack-wsadmin/tmp/salt-unix/master_event_pub.ipc 
[DEBUG   ] MasterEvent PULL socket URI: ipc:///apps/Tools/saltstack-wsadmin/tmp/salt-unix/master_event_pull.ipc 
[DEBUG   ] Reading configuration from /apps/Tools/saltstack-wsadmin/etc/salt/master 
[DEBUG   ] MasterEvent PUB socket URI: ipc:///apps/Tools/saltstack-wsadmin/tmp/salt-unix/master_event_pub.ipc 
[DEBUG   ] MasterEvent PUB socket URI: ipc:///apps/Tools/saltstack-wsadmin/tmp/salt-unix/master_event_pub.ipc 
[DEBUG   ] MasterEvent PULL socket URI: ipc:///apps/Tools/saltstack-wsadmin/tmp/salt-unix/master_event_pull.ipc 
[DEBUG   ] Reading configuration from /apps/Tools/saltstack-wsadmin/etc/salt/master 
[INFO    ] Starting Salt worker process 4 
[DEBUG   ] MasterEvent PULL socket URI: ipc:///apps/Tools/saltstack-wsadmin/tmp/salt-unix/master_event_pull.ipc 
[DEBUG   ] Reading configuration from /apps/Tools/saltstack-wsadmin/etc/salt/master 
[DEBUG   ] MasterEvent PUB socket URI: ipc:///apps/Tools/saltstack-wsadmin/tmp/salt-unix/master_event_pub.ipc 
[DEBUG   ] MasterEvent PUB socket URI: ipc:///apps/Tools/saltstack-wsadmin/tmp/salt-unix/master_event_pub.ipc 
[DEBUG   ] MasterEvent PULL socket URI: ipc:///apps/Tools/saltstack-wsadmin/tmp/salt-unix/master_event_pull.ipc 
[DEBUG   ] Reading configuration from /apps/Tools/saltstack-wsadmin/etc/salt/master 
.

.

.

(see master_debug.out file attachment for all output)

 

AIX - Minion startup in debug mode

 

(saltstack-wsadmin)wsadmin@aixda051:/apps/Tools/saltstack-wsadmin 
$ salt-minion -c ./etc/salt -l debug   
[DEBUG   ] Reading configuration from /apps/Tools/saltstack-wsadmin/etc/salt/minion 
[DEBUG   ] Configuration file path: /apps/Tools/saltstack-wsadmin/etc/salt/minion 
[INFO    ] Setting up the Salt Minion "aixdev71" 
[DEBUG   ] Created pidfile: /apps/Tools/saltstack-wsadmin/var/run/salt-minion.pid 
[DEBUG   ] Chowned pidfile: /apps/Tools/saltstack-wsadmin/var/run/salt-minion.pid to user: wsadmin 
[DEBUG   ] Reading configuration from /apps/Tools/saltstack-wsadmin/etc/salt/minion 
[DEBUG   ] loading grain in ['/apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/grains', '/apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/salt/grains'] 
[DEBUG   ] Skipping /apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/grains, it is not a directory 
[WARNING ] The tools 'dmidecode', 'lspci' and 'dmesg' failed to execute because they do not exist on the system of the user running this instance or the user does not have the necessary permissions to execute them. Grains output might not be accurate. 
[DEBUG   ] Attempting to authenticate with the Salt Master at 10.14.244.231 
[INFO    ] Generating keys: /apps/Tools/saltstack-wsadmin/etc/salt/pki 
[ERROR   ] The Salt Master has cached the public key for this node, this salt minion will wait for 10 seconds before attempting to re-authenticate 
[INFO    ] Waiting for minion key to be accepted by the master. 
[DEBUG   ] Loaded minion key: /apps/Tools/saltstack-wsadmin/etc/salt/pki/minion.pem 
[ERROR   ] The Salt Master has cached the public key for this node, this salt minion will wait for 10 seconds before attempting to re-authenticate 
[INFO    ] Waiting for minion key to be accepted by the master. 
[DEBUG   ] Loaded minion key: /apps/Tools/saltstack-wsadmin/etc/salt/pki/minion.pem 
[ERROR   ] The Salt Master has cached the public key for this node, this salt minion will wait for 10 seconds before attempting to re-authenticate 
[INFO    ] Waiting for minion key to be accepted by the master. 
[DEBUG   ] Loaded minion key: /apps/Tools/saltstack-wsadmin/etc/salt/pki/minion.pem 
[ERROR   ] The Salt Master has cached the public key for this node, this salt minion will wait for 10 seconds before attempting to re-authenticate 
[INFO    ] Waiting for minion key to be accepted by the master. 
[DEBUG   ] Loaded minion key: /apps/Tools/saltstack-wsadmin/etc/salt/pki/minion.pem 
[ERROR   ] The Salt Master has cached the public key for this node, this salt minion will wait for 10 seconds before attempting to re-authenticate 
[INFO    ] Waiting for minion key to be accepted by the master. 
[DEBUG   ] Loaded minion key: /apps/Tools/saltstack-wsadmin/etc/salt/pki/minion.pem 
[ERROR   ] The Salt Master has cached the public key for this node, this salt minion will wait for 10 seconds before attempting to re-authenticate 
[INFO    ] Waiting for minion key to be accepted by the master. 
[DEBUG   ] Loaded minion key: /apps/Tools/saltstack-wsadmin/etc/salt/pki/minion.pem 
[ERROR   ] The Salt Master has cached the public key for this node, this salt minion will wait for 10 seconds before attempting to re-authenticate 
[INFO    ] Waiting for minion key to be accepted by the master. 
[DEBUG   ] Loaded minion key: /apps/Tools/saltstack-wsadmin/etc/salt/pki/minion.pem 
[ERROR   ] The Salt Master has cached the public key for this node, this salt minion will wait for 10 seconds before attempting to re-authenticate 
[INFO    ] Waiting for minion key to be accepted by the master. 
[DEBUG   ] Loaded minion key: /apps/Tools/saltstack-wsadmin/etc/salt/pki/minion.pem 
[ERROR   ] The Salt Master has cached the public key for this node, this salt minion will wait for 10 seconds before attempting to re-authenticate 
[INFO    ] Waiting for minion key to be accepted by the master. 
[DEBUG   ] Loaded minion key: /apps/Tools/saltstack-wsadmin/etc/salt/pki/minion.pem 
[ERROR   ] The Salt Master has cached the public key for this node, this salt minion will wait for 10 seconds before attempting to re-authenticate 
[INFO    ] Waiting for minion key to be accepted by the master. 
[DEBUG   ] Loaded minion key: /apps/Tools/saltstack-wsadmin/etc/salt/pki/minion.pem 
[ERROR   ] The Salt Master has cached the public key for this node, this salt minion will wait for 10 seconds before attempting to re-authenticate 
[INFO    ] Waiting for minion key to be accepted by the master. 
[DEBUG   ] Loaded minion key: /apps/Tools/saltstack-wsadmin/etc/salt/pki/minion.pem 
[ERROR   ] The Salt Master has cached the public key for this node, this salt minion will wait for 10 seconds before attempting to re-authenticate 
[INFO    ] Waiting for minion key to be accepted by the master. 
[DEBUG   ] Loaded minion key: /apps/Tools/saltstack-wsadmin/etc/salt/pki/minion.pem 
[ERROR   ] The Salt Master has cached the public key for this node, this salt minion will wait for 10 seconds before attempting to re-authenticate 
[INFO    ] Waiting for minion key to be accepted by the master. 
[DEBUG   ] Loaded minion key: /apps/Tools/saltstack-wsadmin/etc/salt/pki/minion.pem 
[ERROR   ] The Salt Master has cached the public key for this node, this salt minion will wait for 10 seconds before attempting to re-authenticate 
[INFO    ] Waiting for minion key to be accepted by the master. 
[DEBUG   ] Loaded minion key: /apps/Tools/saltstack-wsadmin/etc/salt/pki/minion.pem 
[ERROR   ] The Salt Master has cached the public key for this node, this salt minion will wait for 10 seconds before attempting to re-authenticate 
[INFO    ] Waiting for minion key to be accepted by the master. 
[DEBUG   ] Loaded minion key: /apps/Tools/saltstack-wsadmin/etc/salt/pki/minion.pem 


[DEBUG   ] Decrypting the current master AES key 

[DEBUG   ] Loaded minion key: /apps/Tools/saltstack-wsadmin/etc/salt/pki/minion.pem 
Illegal instruction(coredump) 
(saltstack-wsadmin)wsadmin@aixda051:/apps/Tools/saltstack-wsadmin 
$

 

(see minion_debug.out file attachment for all output)

 

Please let me know if you have any questions or need any additional information from me such as the core file created to debug this issue.  I will continue looking over things and see if something new comes up that I may have overlooked before in regards to the problem.

 

 

Best Regards,

 

Robert Murley



On Monday, August 5, 2013 11:40:50 PM UTC-4, Robert Murley wrote:
master_debug.out
minion_debug.out

Colton Myers

unread,
Aug 7, 2013, 6:47:18 PM8/7/13
to salt-...@googlegroups.com
Interesting, so it seems to "just" be an authentication problem.  Good information, thanks for the logs!

--
Colton Myers


David Boucha

unread,
Aug 7, 2013, 8:03:06 PM8/7/13
to salt users list
Thanks for the logs!  Colton and I will look these through.


On Wed, Aug 7, 2013 at 4:22 PM, Robert Murley <rdmu...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Robert Murley

unread,
Aug 8, 2013, 1:30:51 AM8/8/13
to salt-...@googlegroups.com
David and Colton,

I did some further research on the coredump file created by the minion and confirmed that python failed shown below

(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin
$ lquerypv -h ./core 6b0 64 
000006B0   7FFFFFFF FFFFFFFF 7FFFFFFF FFFFFFFF  |................|
000006C0   00000000 000186A0 7FFFFFFF FFFFFFFF  |................|
000006D0   00120000 618F2020 00000000 0000000E  |....a.  ........|
000006E0   70797468 6F6E0000 00000000 00000000  |python..........|
000006F0   00000000 00000000 00000000 00000000  |................|
00000700   00000000 00000000 00000000 00000B22  |..............."|
00000710   00000000 00000015 00000000 00000B22  |..............."|
(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin
$  

I will try the same thing on my AIX 6.1 64-bit Server minion host and see if there is a difference.  I will need to get the dbx tool installed on AIX to perform a deep dive analysis of the core file and will continue to review the python build on both AIX servers.


Best Regards,

Robert Murley


On Monday, August 5, 2013 11:40:50 PM UTC-4, Robert Murley wrote:

Robert Murley

unread,
Aug 8, 2013, 3:22:18 AM8/8/13
to salt-...@googlegroups.com
David and Colton,

I enabled the Python Debugger when starting the minion as shown below

Update existing salt-minion script in bin location

(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin/bin
$ cat salt-minion
#!/apps/Tools/saltstack-wsadmin/bin/python
'''
This script is used to kick off a salt minion daemon
'''

'''
Added for Python debugging
'''
import pdb; pdb.set_trace()


from salt.scripts import salt_minion
from multiprocessing import freeze_support


if __name__ == '__main__':
    # This handles the bootstrapping code that is included with frozen
    # scripts. It is a no-op on unfrozen code.
    freeze_support()
    salt_minion()
(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin/bin
$


Execute the start-minion script, break into the debugger and step/next through until the coredump occurs

(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin

$ salt-minion -c ./etc/salt -l debug

(skipping to the end of pdb output just before the coredump)

.
.
.

> /apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/M2Crypto-0.21.1-py2.7-aix-7.1.egg/M2Crypto/RSA.py(28)__init__()
-> self._pyfree = _pyfree
(Pdb)
--Call--
> /apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/M2Crypto-0.21.1-py2.7-aix-7.1.egg/M2Crypto/RSA.py(268)__setattr__()
-> def __setattr__(self, name, value):
(Pdb)
> /apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/M2Crypto-0.21.1-py2.7-aix-7.1.egg/M2Crypto/RSA.py(269)__setattr__()
-> if name in ['e', 'n']:
(Pdb)
> /apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/M2Crypto-0.21.1-py2.7-aix-7.1.egg/M2Crypto/RSA.py(273)__setattr__()
-> self.__dict__[name] = value
(Pdb)
--Return--
> /apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/M2Crypto-0.21.1-py2.7-aix-7.1.egg/M2Crypto/RSA.py(273)__setattr__()->None
-> self.__dict__[name] = value
(Pdb)
--Return--
> /apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/M2Crypto-0.21.1-py2.7-aix-7.1.egg/M2Crypto/RSA.py(28)__init__()->None
-> self._pyfree = _pyfree
(Pdb)
--Return--
> /apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/M2Crypto-0.21.1-py2.7-aix-7.1.egg/M2Crypto/RSA.py(423)load_pub_key_bio()-><M2Crypto.RSA...at 0x30cf51e8>
-> return RSA_pub(rsa, 1)
(Pdb)
--Return--
> /apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/M2Crypto-0.21.1-py2.7-aix-7.1.egg/M2Crypto/RSA.py(406)load_pub_key()-><M2Crypto.RSA...at 0x30cf51e8>
-> return load_pub_key_bio(bio)
(Pdb)
> /apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/salt/crypt.py(209)decrypt_aes()
-> digest = hashlib.sha256(key_str).hexdigest()

(Pdb)


Illegal instruction(coredump)
(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin
$


I hope this Python debugger information helps and I will continue to investigate on my side.  Please let me know if you have any questions or concerns.


Best Regards,

Robert Murley


On Monday, August 5, 2013 11:40:50 PM UTC-4, Robert Murley wrote:

Antoine Pitrou

unread,
Aug 8, 2013, 4:37:30 AM8/8/13
to salt-...@googlegroups.com

Hello,

Le Thu, 8 Aug 2013 00:22:18 -0700 (PDT),
Robert Murley <rdmu...@gmail.com> a
écrit :
[...]
> (skipping to the end of pdb output just before the coredump)
> /apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/salt/crypt.py(209)decrypt_aes()
> -> digest = hashlib.sha256(key_str).hexdigest()
> (Pdb)
>
>
> Illegal instruction(coredump)
> (saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin
> $

For such low-level crashes, it will be useful to have a C stack trace
(using gdb or something else). This assumes that debug symbols are not
stripped from your Python executable.

Some more points to watch for:

- What is the architecture of your machine? From the sound of it, it
may be a big-endian 64-bit machine, which is a much less common setup
than little-endian 64-bit (let alone 32-bit). These days, we have a
PPC64 buildbot which runs the test suite fine (not under AIX, though):
http://buildbot.python.org/all/builders/PPC64%20PowerLinux%202.7

- What compiler are you using?

- hashlib's sha256 can have two implementations: OpenSSL-based (if
available on your machine) or a custom fallback. Please try "import
_hashlib" (note the leading underscore) to check whether the
OpenSSL-based hashlib is available.

NOTE: I'm not a Salt expert, I'm just giving suggestions from the
Python side of things.

Regards

Antoine.

Robert Murley

unread,
Aug 8, 2013, 1:21:01 PM8/8/13
to salt-...@googlegroups.com
Antoine,

Thanks for your response on this subject matter.  I agree that a C stack trace (using GNU gdb or AIX dbx) would be useful for better analyzing this situation.  Unfortunately neither of these are available on the server and I don't have root access to install them so will have to engage the AIX administration folks to do so.  I'm not sure if there is a preference to install and use the native dbx or GNU gdb so you would have to let me know, but GNU gdb would be easier since I already the RPM and dependencies needed for installation on AIX.

The architecture is a 64-bit LPAR running AIX operating system.  Generally our LPARs are installed with a Python binary RPM along with dependency binary RPMs from one of the two main AIX open source software providers (http://www.bullfreeware.com/toolbox.php or http://www.perzl.org/aix/index.php) so no compilers are needed.  This particular server is using the Python 2.7.5 binary RPM along with dependencies from the Bull freeware site and I haven't had any issues with Perl so far before using the SaltStack project code.  If you think this could be the problem then I could always build/install from the Python 2.7.5 source as my non-root user using the --prefix option and rebuild a new virtualenv with it for hosting the Salt minion like I'm currently doing with the binary RPM Python install.  Please let me know if you think that is the best course of action to do next or focus on getting gdb or dbx available on the server to have C stack trace information available for review?

I also confirmed that _hashlib is available as shown below

(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin
$ python -m hashlib
(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin
$ python -m _hashlib
/apps/Tools/saltstack-wsadmin/bin/python: No code object available for _hashlib
(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin


Best Regards,

Robert Murley


On Monday, August 5, 2013 11:40:50 PM UTC-4, Robert Murley wrote:
Message has been deleted

Robert Murley

unread,
Aug 8, 2013, 2:45:16 PM8/8/13
to salt-...@googlegroups.com
David and Colton,

I see that crypt.py for salt is importing hashlib shown below

(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/salt
$ view crypt.py
"crypt.py" 457 lines, 16112 characters
'''
The crypt module manages all of the cryptography functions for minions and
masters, encrypting and decrypting payloads, preparing messages, and
authenticating peers
'''

# Import python libs
import os
import sys
import time
import hmac
import shutil
import hashlib 
import logging

# Import third party libs
from M2Crypto import RSA
from Crypto.Cipher import AES

# Import salt libs
import salt.utils
import salt.payload
import salt.utils.verify
import salt.version
from salt.exceptions import (
    AuthenticationError, SaltClientError, SaltReqTimeoutError
)

log = logging.getLogger(__name__)

.
.
.

(snippet above)

Is it possible to update this file with what Antoine suggested earlier by importing _hashlib for using the OpenSSL-based hashlib if available?  I'm not sure if this will break something in your Salt project code or not.  Please let me know what you think.


Best Regards,

Robert Murley


On Monday, August 5, 2013 11:40:50 PM UTC-4, Robert Murley wrote:

Antoine Pitrou

unread,
Aug 9, 2013, 4:12:28 AM8/9/13
to salt-...@googlegroups.com

Hi,

Le Thu, 8 Aug 2013 11:45:16 -0700 (PDT),
Robert Murley <rdmu...@gmail.com> a
écrit :
>
> Is it possible to update this file with what Antoine suggested
> earlier by importing _hashlib for using the OpenSSL-based hashlib if
> available?

No need for that. "import hashlib" uses _hashlib under the hood if
possible. Only if _hashlib isn't available does it fallback on custom C
code.

Regards

Antoine.


Antoine Pitrou

unread,
Aug 9, 2013, 4:20:36 AM8/9/13
to salt-...@googlegroups.com
Le Thu, 8 Aug 2013 10:21:17 -0700 (PDT),
Robert Murley <rdmu...@gmail.com> a
écrit :
> This particular server is using the Python 2.7.5 binary RPM along
> with dependencies from the Bull freeware site and I haven't had any
> issues with Perl so far before using the SaltStack project code. If
> you think this could be the problem then I could always build/install
> from the Python 2.7.5 source as my non-root user using the --prefix
> option and rebuild a new virtualenv with it for hosting the Salt
> minion like I'm currently doing with the binary RPM Python install.
> Please let me know if you think that is the best course of action to
> do next or focus on getting gdb or dbx available on the server to
> have C stack trace information available for review?

I would focus on getting a C stack trace.
You don't necessarily need the server to have gdb, by the way. I think
you could copy the core file to a similar AIX system with gdb on it.

A C stack trace would help confirm that the crash does happen during
sha256'ing, and whether it happes in OpenSSL or in Python's API wrapper.

That said, even knowing that it crashes while sha256'ing doesn't mean
hashlib or OpenSSL is at fault. Perhaps the pointer given to hashlib is
invalid. According to your Python stack trace, M2Crypto is involved as
well. The problem is that M2Crypto isn't really maintained anymore. I
would strongly urge the Salt developers to switch to another crypto
library.

(I would also suggest they expose their crypto needs on the python-ideas
mailing-list, since shipping some cipher functions in the stdlib is an
idea that has been floating for a while:
http://bugs.python.org/issue8998
)

> I also confirmed that _hashlib is available as shown below

Ok, perhaps you could check whether sha256 works otherwise fine or not.
e.g.:

>>> import hashlib
>>> hashlib.sha256(b"x"*200000).hexdigest()
'91e3faafd322bcdf160f3f0ce886acb092b9b9e2a1e8526b40f21a8898a8700b'

Also, I don't know if the Python test suite is part of the Bull
packages, but you can try to run:

python -m test.regrtest -v test_hashlib

Regards

Antoine.


>
> (saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin
> $ python -m hashlib
> (saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin
> $ python -m _hashlib
> /apps/Tools/saltstack-wsadmin/bin/python: No code object available
> for _hashlib
> (saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin
> $
>
> Best Regards,
>
> Robert Murley
>
>
> On Monday, August 5, 2013 11:40:50 PM UTC-4, Robert Murley wrote:
> >

Robert Murley

unread,
Aug 9, 2013, 11:23:14 AM8/9/13
to salt-...@googlegroups.com
Antoine,

I confirmed the following for you with gdb I got installed yesterday on the AIX server below

(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin
$ gdb /apps/Tools/saltstack-wsadmin/bin/python ./core
GNU gdb (GDB) 7.5
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "powerpc64-ibm-aix6.1.2.0".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /apps/Tools/saltstack-wsadmin/bin/python...(no debugging symbols found)...done.
Core was generated by `python'.
Program terminated with signal 4, Illegal instruction.
#0  0x00000000 in ?? ()
(gdb) where
#0  0x00000000 in ?? ()
#1  0xd495cc08 in EVP_DigestUpdate () from /opt/freeware/lib/libcrypto.so
#2  0xd16b041c in EVP_hash () from /apps/Tools/saltstack-wsadmin/lib/python2.7/lib-dynload/_hashlib.so
#3  0xd16afb88 in EVPnew () from /apps/Tools/saltstack-wsadmin/lib/python2.7/lib-dynload/_hashlib.so
#4  0xd16af730 in EVP_new_sha256 () from /apps/Tools/saltstack-wsadmin/lib/python2.7/lib-dynload/_hashlib.so
#5  0xd1f69630 in PyCFunction_Call () from /opt/freeware/lib/libpython2.7.so
#6  0xd1f38484 in call_function () from /opt/freeware/lib/libpython2.7.so
Backtrace stopped: frame did not save the PC
(gdb) thread apply all bt

Thread 1 (process 1):
#0  0x00000000 in ?? ()
#1  0xd495cc08 in EVP_DigestUpdate () from /opt/freeware/lib/libcrypto.so
#2  0xd16b041c in EVP_hash () from /apps/Tools/saltstack-wsadmin/lib/python2.7/lib-dynload/_hashlib.so
#3  0xd16afb88 in EVPnew () from /apps/Tools/saltstack-wsadmin/lib/python2.7/lib-dynload/_hashlib.so
#4  0xd16af730 in EVP_new_sha256 () from /apps/Tools/saltstack-wsadmin/lib/python2.7/lib-dynload/_hashlib.so
#5  0xd1f69630 in PyCFunction_Call () from /opt/freeware/lib/libpython2.7.so
#6  0xd1f38484 in call_function () from /opt/freeware/lib/libpython2.7.so
Backtrace stopped: frame did not save the PC
(gdb) quit
(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin


Also, looks like there is a problem with hashlib sha256 as shown below

(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin
$ python
Python 2.7.5 (default, Jul 15 2013, 16:52:51) [C] on aix6
Type "help", "copyright", "credits" or "license" for more information.
>>> import hashlib
>>> hashlib.sha256(b"x"*200000).hexdigest()
Illegal instruction(coredump)
(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin


Python test suite isn't part of Bull freeware package installed shown below

(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin
$ python -m test.regrtest -v test_hashlib
/apps/Tools/saltstack-wsadmin/bin/python: No module named test
(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin
$

At this point I think it would be best to build/install Python 2.7.5 from source on my AIX 6.1 and 7.1 development servers and create my own RPM binary install from them for use on other LPARs (6.1 or 7.1) making sure debug symbols and test suite are included.  Does this sound like the best course of action from your perspective?


Best Regards,

Robert Murley


On Monday, August 5, 2013 11:40:50 PM UTC-4, Robert Murley wrote:

Antoine Pitrou

unread,
Aug 9, 2013, 11:42:45 AM8/9/13
to salt-...@googlegroups.com
Le Fri, 9 Aug 2013 08:23:14 -0700 (PDT),
Robert Murley <rdmu...@gmail.com> a
écrit :
>
> Also, looks like there is a problem with hashlib sha256 as shown below
>
> (saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin
> $ python
> Python 2.7.5 (default, Jul 15 2013, 16:52:51) [C] on aix6
> Type "help", "copyright", "credits" or "license" for more
> information.
> >>> import hashlib
> >>> hashlib.sha256(b"x"*200000).hexdigest()
> Illegal instruction(coredump)

Ok, so either OpenSSL or the _hashlib module has a problem on your
system.

> At this point I think it would be best to build/install Python 2.7.5
> from source on my AIX 6.1 and 7.1 development servers and create my
> own RPM binary install from them for use on other LPARs (6.1 or 7.1)
> making sure debug symbols and test suite are included. Does this
> sound like the best course of action from your perspective?

If you build Python from source, you can run the test suite before
building your RPM (also, make sure you have OpenSSL development
headers installed).

Also, if you want further checks and assertions, you can enable
debug mode (not for production use):
http://docs.python.org/devguide/setup.html#unix

If you can reproduce the hashlib crash using your custom built Python
2.7.5, please open an issue at http://bugs.python.org/

Regards

Antoine.


Robert Murley

unread,
Aug 20, 2013, 5:34:31 PM8/20/13
to salt-...@googlegroups.com
Antoine,

Sorry it has taken some time to get all of the necessary pieces installed on the AIX 7.1 development system I was debugging earlier with the broken Python 2.7.5 hashlib module from the Bull freeware/Perzl RPM install.  I was able to successfully build a custom 32-bit Python 2.7.5 on AIX 7.1 with a working hashlib module shown below

wsadmin@aixdev71:/apps/Tools/python-2.7.5
$ ls
bin      include  lib      share
wsadmin@aixdev71:/apps/Tools/python-2.7.5
$ export LIBPATH=/apps/Tools/python-2.7.5/lib
wsadmin@aixdev71:/apps/Tools/python-2.7.5
$ ./bin/python -V
Python 2.7.5
wsadmin@aixdev71:/apps/Tools/python-2.7.5
$ ./bin/python  
Python 2.7.5 (default, Aug 15 2013, 17:52:56)
[GCC 4.7.2] on aix7

Type "help", "copyright", "credits" or "license" for more information.
>>> import hashlib
>>> hashlib.sha256(b"x"*200000).hexdigest()

'91e3faafd322bcdf160f3f0ce886acb092b9b9e2a1e8526b40f21a8898a8700b'
>>> import sys
>>> print("%x" % sys.maxsize, sys.maxsize > 2**32)
('7fffffff', False)
>>> print("%x" % sys.maxsize, sys.maxsize > 1**32)
('7fffffff', True)
>>> quit()
wsadmin@aixdev71:/apps/Tools/python-2.7.5
$

I had a few issues I had to work through with getting a complete 32-bit build of the Python 2.7.5 source on AIX that I will open with an issue at http://bugs.python.org for validation/documentation purposes.  I would also like to complete a full 64-bit build from source on AIX as well that I will open an issue for in the near future, but the 32-bit build is fine for now.  Please let me know if you have any questions or concerns.

Best Regards,

Robert Murley 

 
On Monday, August 5, 2013 11:40:50 PM UTC-4, Robert Murley wrote:

Robert Murley

unread,
Aug 20, 2013, 6:53:38 PM8/20/13
to salt-...@googlegroups.com
David and Colton,

I was able to successfully install, setup and perform some basic tests of the SaltStack Master and Minion (version 0.16.x) on AIX 7.1 shown below

(SaltStack requirements and dependencies within a Python 2.7.5 virtualenv)

(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin
$ pip list

Jinja2 (2.7.1)
M2Crypto (0.21.1)
MarkupSafe (0.18)
msgpack-python (0.3.0)

pip (1.4.1)

pycrypto (2.6)
PyYAML (3.10)
pyzmq (13.1.0)
salt (0.16.2)
setuptools (0.9.8)
wsgiref (0.1.2)

(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin
$

(Master startup on AIX 7.1 in debug mode)

(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin

$ salt-master -c ./etc/salt -l debug
[DEBUG   ] Reading configuration from /apps/Tools/saltstack-wsadmin/etc/salt/master
[DEBUG   ] Configuration file path: /apps/Tools/saltstack-wsadmin/etc/salt/master
[INFO    ] Setting up the Salt Master
[DEBUG   ] Loaded master key: /apps/Tools/saltstack-wsadmin/etc/salt/pki/master.pem
[INFO    ] Preparing the wsadmin key for local communication
[DEBUG   ] Removing stale keyfile: /apps/Tools/saltstack-wsadmin/var/cache/salt/.wsadmin_key
[DEBUG   ] Created pidfile: /apps/Tools/saltstack-wsadmin/var/run/salt-master.pid
[DEBUG   ] Chowned pidfile: /apps/Tools/saltstack-wsadmin/var/run/salt-master.pid to user: wsadmin

[DEBUG   ] loading fileserver in ['/apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/fileserver', '/apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/salt/fileserver']

[DEBUG   ] Skipping /apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/fileserver, it is not a directory
[INFO    ] salt-master is starting as user 'wsadmin'

[INFO    ] Current values for max open files soft/hard setting: 6000/6000
[INFO    ] The value for the 'max_open_files' setting, 100000, is higher than what the user running salt is allowed to raise to, 6000. Defaulting to 6000.

[DEBUG   ] Reading configuration from /apps/Tools/saltstack-wsadmin/etc/salt/master
[INFO    ] Starting the Salt Publisher on tcp://0.0.0.0:4505

[DEBUG   ] loading grain in ['/apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/grains', '/apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/salt/grains']

[INFO    ] Setting up the master communication server

[DEBUG   ] Skipping /apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/grains, it is not a directory

[INFO    ] Starting Salt worker process 0
[INFO    ] Starting Salt worker process 1
[INFO    ] Starting Salt worker process 2
[INFO    ] Starting Salt worker process 3

[INFO    ] Starting Salt worker process 4

[DEBUG   ] MasterEvent PUB socket URI: ipc:///apps/Tools/saltstack-wsadmin/tmp/salt-unix/master_event_pub.ipc
[DEBUG   ] MasterEvent PULL socket URI: ipc:///apps/Tools/saltstack-wsadmin/tmp/salt-unix/master_event_pull.ipc
[DEBUG   ] MasterEvent PUB socket URI: ipc:///apps/Tools/saltstack-wsadmin/tmp/salt-unix/master_event_pub.ipc
[DEBUG   ] MasterEvent PULL socket URI: ipc:///apps/Tools/saltstack-wsadmin/tmp/salt-unix/master_event_pull.ipc
[DEBUG   ] Reading configuration from /apps/Tools/saltstack-wsadmin/etc/salt/master
[DEBUG   ] MasterEvent PUB socket URI: ipc:///apps/Tools/saltstack-wsadmin/tmp/salt-unix/master_event_pub.ipc
[DEBUG   ] MasterEvent PULL socket URI: ipc:///apps/Tools/saltstack-wsadmin/tmp/salt-unix/master_event_pull.ipc
[DEBUG   ] MasterEvent PUB socket URI: ipc:///apps/Tools/saltstack-wsadmin/tmp/salt-unix/master_event_pub.ipc
[DEBUG   ] MasterEvent PULL socket URI: ipc:///apps/Tools/saltstack-wsadmin/tmp/salt-unix/master_event_pull.ipc
[DEBUG   ] MasterEvent PUB socket URI: ipc:///apps/Tools/saltstack-wsadmin/tmp/salt-unix/master_event_pub.ipc

[DEBUG   ] Reading configuration from /apps/Tools/saltstack-wsadmin/etc/salt/master
[DEBUG   ] Reading configuration from /apps/Tools/saltstack-wsadmin/etc/salt/master

[DEBUG   ] Reading configuration from /apps/Tools/saltstack-wsadmin/etc/salt/master
[DEBUG   ] MasterEvent PULL socket URI: ipc:///apps/Tools/saltstack-wsadmin/tmp/salt-unix/master_event_pull.ipc

[DEBUG   ] Missing configuration file: /home/wsadmin/.salt
[DEBUG   ] Missing configuration file: /home/wsadmin/.salt
[DEBUG   ] LocalClientEvent PUB socket URI: ipc:///apps/Tools/saltstack-wsadmin/tmp/salt-unix/master_event_pub.ipc

[WARNING ] The tools 'dmidecode', 'lspci' and 'dmesg' failed to execute because they do not exist on the system of the user running this instance or the user does not have the necessary permissions to execute them. Grains output might not be accurate.

[DEBUG   ] Reading configuration from /apps/Tools/saltstack-wsadmin/etc/salt/master

[DEBUG   ] LocalClientEvent PULL socket URI: ipc:///apps/Tools/saltstack-wsadmin/tmp/salt-unix/master_event_pull.ipc
[DEBUG   ] Missing configuration file: /home/wsadmin/.salt
[DEBUG   ] Missing configuration file: /home/wsadmin/.salt
[DEBUG   ] LocalClientEvent PUB socket URI: ipc:///apps/Tools/saltstack-wsadmin/tmp/salt-unix/master_event_pub.ipc
[DEBUG   ] LocalClientEvent PULL socket URI: ipc:///apps/Tools/saltstack-wsadmin/tmp/salt-unix/master_event_pull.ipc
[DEBUG   ] loading auth in ['/apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/auth', '/apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/salt/auth']
[DEBUG   ] LocalClientEvent PUB socket URI: ipc:///apps/Tools/saltstack-wsadmin/tmp/salt-unix/master_event_pub.ipc
[DEBUG   ] Skipping /apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/auth, it is not a directory
[DEBUG   ] LocalClientEvent PULL socket URI: ipc:///apps/Tools/saltstack-wsadmin/tmp/salt-unix/master_event_pull.ipc
[DEBUG   ] loading auth in ['/apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/auth', '/apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/salt/auth']
[DEBUG   ] Skipping /apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/auth, it is not a directory
[DEBUG   ] loading auth in ['/apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/auth', '/apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/salt/auth']
[DEBUG   ] LocalClientEvent PUB socket URI: ipc:///apps/Tools/saltstack-wsadmin/tmp/salt-unix/master_event_pub.ipc
[DEBUG   ] Skipping /apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/auth, it is not a directory
[DEBUG   ] LocalClientEvent PULL socket URI: ipc:///apps/Tools/saltstack-wsadmin/tmp/salt-unix/master_event_pull.ipc
[DEBUG   ] loading auth in ['/apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/auth', '/apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/salt/auth']
[DEBUG   ] Skipping /apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/auth, it is not a directory
[DEBUG   ] Missing configuration file: /home/wsadmin/.salt
[DEBUG   ] LocalClientEvent PUB socket URI: ipc:///apps/Tools/saltstack-wsadmin/tmp/salt-unix/master_event_pub.ipc
[DEBUG   ] LocalClientEvent PULL socket URI: ipc:///apps/Tools/saltstack-wsadmin/tmp/salt-unix/master_event_pull.ipc
[DEBUG   ] loading auth in ['/apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/auth', '/apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/salt/auth']
[DEBUG   ] Skipping /apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/auth, it is not a directory
[DEBUG   ] loading module in ['/apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/modules', '/apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/salt/modules'] 

.

.  (only showing a snippet of the debug output)

.

[DEBUG   ] This salt-master instance has accepted 1 minion keys. 

[INFO    ] Authentication request from aixdev71
[INFO    ] Authentication accepted from aixdev71
[INFO    ] AES payload received with command _pillar
[DEBUG   ] loading module in ['/apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/modules', '/apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/salt/modules']
[DEBUG   ] Skipping /apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/modules, it is not a directory
[DEBUG   ] Loaded localemod as virtual locale
[DEBUG   ] Loaded sysmod as virtual sys
[DEBUG   ] Loaded parted as virtual partition
[DEBUG   ] KeyError when loading rpm
Traceback (most recent call last):
  File "/apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/salt/loader.py", line 699, in gen_functions
    virtual = mod.__virtual__()
  File "/apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/salt/modules/rpm.py", line 26, in __virtual__
    os_major = int(__grains__['osrelease'].split('.')[0])
KeyError: 'osrelease'
[DEBUG   ] Loaded cmdmod as virtual cmd
[DEBUG   ] Loaded djangomod as virtual django
[DEBUG   ] loading render in ['/apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/renderers', '/apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/salt/renderers']
[DEBUG   ] Skipping /apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/renderers, it is not a directory
[DEBUG   ] loading pillar in ['/apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/pillar', '/apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/salt/pillar']
[DEBUG   ] Skipping /apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/pillar, it is not a directory
[INFO    ] AES payload received with command _minion_event
[INFO    ] Clear payload received with command _auth
[DEBUG   ] This salt-master instance has accepted 1 minion keys.
[INFO    ] Authentication request from aixdev71
[INFO    ] Authentication accepted from aixdev71
[INFO    ] AES payload received with command _mine
[INFO    ] Clear payload received with command publish
[INFO    ] User wsadmin Published command test.ping with jid 20130820182444175978
[DEBUG   ] Published command details {'tgt_type': 'glob', 'jid': '20130820182444175978', 'tgt': '*', 'ret': '', 'user': 'wsadmin', 'arg': [], 'fun': 'test.ping'}
[INFO    ] AES payload received with command _return
[INFO    ] Got return from aixdev71 for job 20130820182444175978
[INFO    ] Clear payload received with command publish
[INFO    ] User wsadmin Published command test.ping with jid 20130820182455824197
[DEBUG   ] Published command details {'tgt_type': 'glob', 'jid': '20130820182455824197', 'tgt': 'aixdev71', 'ret': '', 'user': 'wsadmin', 'arg': [], 'fun': 'test.ping'}
[INFO    ] AES payload received with command _return
[INFO    ] Got return from aixdev71 for job 20130820182455824197
[INFO    ] Clear payload received with command publish
[INFO    ] User wsadmin Published command cmd.run with jid 20130820182500424856
[DEBUG   ] Published command details {'tgt_type': 'glob', 'jid': '20130820182500424856', 'tgt': 'aixdev71', 'ret': '', 'user': 'wsadmin', 'arg': ['oslevel -s'], 'fun': 'cmd.run'}
[INFO    ] AES payload received with command _return
[INFO    ] Got return from aixdev71 for job 20130820182500424856  

(Minion startup on AIX 7.1 in debug mode)

(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin
$ salt-minion -c ./etc/salt -l debug

[DEBUG   ] Reading configuration from /apps/Tools/saltstack-wsadmin/etc/salt/minion
[DEBUG   ] Configuration file path: /apps/Tools/saltstack-wsadmin/etc/salt/minion
[INFO    ] Setting up the Salt Minion "aixdev71"
[DEBUG   ] Created pidfile: /apps/Tools/saltstack-wsadmin/var/run/salt-minion.pid
[DEBUG   ] Chowned pidfile: /apps/Tools/saltstack-wsadmin/var/run/salt-minion.pid to user: wsadmin
[DEBUG   ] Reading configuration from /apps/Tools/saltstack-wsadmin/etc/salt/minion
[DEBUG   ] loading grain in ['/apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/grains', '/apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/salt/grains']
[DEBUG   ] Skipping /apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/grains, it is not a directory
[WARNING ] The tools 'dmidecode', 'lspci' and 'dmesg' failed to execute because they do not exist on the system of the user running this instance or the user does not have the necessary permissions to execute them. Grains output might not be accurate.

[DEBUG   ] Attempting to authenticate with the Salt Master at 10.14.81.67

[DEBUG   ] Loaded minion key: /apps/Tools/saltstack-wsadmin/etc/salt/pki/minion.pem
[ERROR   ] The Salt Master has cached the public key for this node, this salt minion will wait for 10 seconds before attempting to re-authenticate
[INFO    ] Waiting for minion key to be accepted by the master.
[DEBUG   ] Loaded minion key: /apps/Tools/saltstack-wsadmin/etc/salt/pki/minion.pem
[ERROR   ] The Salt Master has cached the public key for this node, this salt minion will wait for 10 seconds before attempting to re-authenticate
[INFO    ] Waiting for minion key to be accepted by the master.
[DEBUG   ] Loaded minion key: /apps/Tools/saltstack-wsadmin/etc/salt/pki/minion.pem

[DEBUG   ] Decrypting the current master AES key

[DEBUG   ] Loaded minion key: /apps/Tools/saltstack-wsadmin/etc/salt/pki/minion.pem

[INFO    ] Authentication with master successful!

[DEBUG   ] Loaded minion key: /apps/Tools/saltstack-wsadmin/etc/salt/pki/minion.pem

[DEBUG   ] Decrypting the current master AES key

[DEBUG   ] Loaded minion key: /apps/Tools/saltstack-wsadmin/etc/salt/pki/minion.pem
[DEBUG   ] Loaded minion key: /apps/Tools/saltstack-wsadmin/etc/salt/pki/minion.pem

[DEBUG   ] Reading configuration from /apps/Tools/saltstack-wsadmin/etc/salt/minion
[DEBUG   ] loading grain in ['/apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/grains', '/apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/salt/grains']
[DEBUG   ] Skipping /apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/grains, it is not a directory
[WARNING ] The tools 'dmidecode', 'lspci' and 'dmesg' failed to execute because they do not exist on the system of the user running this instance or the user does not have the necessary permissions to execute them. Grains output might not be accurate.

[DEBUG   ] loading module in ['/apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/modules', '/apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/salt/modules']
[DEBUG   ] Skipping /apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/modules, it is not a directory
[DEBUG   ] Loaded localemod as virtual locale
[DEBUG   ] Loaded sysmod as virtual sys
[DEBUG   ] Loaded parted as virtual partition
[DEBUG   ] KeyError when loading rpm
Traceback (most recent call last):
  File "/apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/salt/loader.py", line 699, in gen_functions
    virtual = mod.__virtual__()
  File "/apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/salt/modules/rpm.py", line 26, in __virtual__
    os_major = int(__grains__['osrelease'].split('.')[0])
KeyError: 'osrelease'
[DEBUG   ] Loaded cmdmod as virtual cmd
[DEBUG   ] Loaded djangomod as virtual django
[DEBUG   ] loading returner in ['/apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/returners', '/apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/salt/returners']
[DEBUG   ] Skipping /apps/Tools/saltstack-wsadmin/var/cache/salt/extmods/returners, it is not a directory
[DEBUG   ] Loaded syslog_return as virtual syslog
[DEBUG   ] Loaded carbon_return as virtual carbon
[INFO    ] Minion is starting as user 'wsadmin'
[DEBUG   ] Minion "aixdev71" trying to tune in
[DEBUG   ] Minion PUB socket URI: ipc:///apps/Tools/saltstack-wsadmin/var/run/salt/minion/minion_event_2505f10f66c3b3f4755a175bfbc722c7_pub.ipc
[DEBUG   ] Minion PULL socket URI: ipc:///apps/Tools/saltstack-wsadmin/var/run/salt/minion/minion_event_2505f10f66c3b3f4755a175bfbc722c7_pull.ipc
[DEBUG   ] Setting zmq_reconnect_ivl to '100ms'
[DEBUG   ] Setting zmq_reconnect_ivl_max to '5100ms'
[DEBUG   ] Running scheduled job: __mine_interval

[DEBUG   ] Loaded minion key: /apps/Tools/saltstack-wsadmin/etc/salt/pki/minion.pem

[DEBUG   ] Decrypting the current master AES key

[DEBUG   ] Loaded minion key: /apps/Tools/saltstack-wsadmin/etc/salt/pki/minion.pem

[INFO    ] User wsadmin Executing command test.ping with jid 20130820182444175978
[DEBUG   ] Command details {'tgt_type': 'glob', 'jid': '20130820182444175978', 'tgt': '*', 'ret': '', 'user': 'wsadmin', 'arg': [], 'fun': 'test.ping'}
[INFO    ] Returning information for job: 20130820182444175978
[INFO    ] User wsadmin Executing command test.ping with jid 20130820182455824197
[DEBUG   ] Command details {'tgt_type': 'glob', 'jid': '20130820182455824197', 'tgt': 'aixdev71', 'ret': '', 'user': 'wsadmin', 'arg': [], 'fun': 'test.ping'}
[INFO    ] Returning information for job: 20130820182455824197
[INFO    ] User wsadmin Executing command cmd.run with jid 20130820182500424856
[DEBUG   ] Command details {'tgt_type': 'glob', 'jid': '20130820182500424856', 'tgt': 'aixdev71', 'ret': '', 'user': 'wsadmin', 'arg': ['oslevel -s'], 'fun': 'cmd.run'}
[INFO    ] Executing command 'oslevel -s' in directory '/home/wsadmin'
[DEBUG   ] output: 7100-02-01-1245
[INFO    ] Returning information for job: 20130820182500424856 

(Minion key acceptance on AIX 7.1)

(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin
$ salt-key -c ./etc/salt -L
Accepted Keys:
Unaccepted Keys:
aixdev71
Rejected Keys:
(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin
$ salt-key -c ./etc/salt -A
The following keys are going to be accepted:
Unaccepted Keys:
aixdev71
Proceed? [n/Y] Y
Key for minion aixdev71 accepted.
(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin
$ salt-key -c ./etc/salt -L
Accepted Keys:
aixdev71
Unaccepted Keys:
Rejected Keys:
(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin

(Minion tests/commands on AIX 7.1)

(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin
$ salt -c ./etc/salt '*' test.ping
aixdev71:
    True
(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin
$ salt -c ./etc/salt 'aixdev71' test.ping
aixdev71:
    True
(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin
$ salt -c ./etc/salt 'aixdev71' cmd.run 'oslevel -s'
aixdev71:
    7100-02-01-1245
(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin
$

I will open new posts specific to the Master and Minion for additional questions or issues to discuss going forward.  At this point I am able to successfully install and use the SaltStack Master and Minion (version 0.16.x) on AIX 7.1 and will be testing this on AIX 6.1 in the future as well which should also yield the same results I'm currently getting with AIX 7.1 at this time.  Please let me know if you have any questions or concerns about me moving forward with SaltStack on AIX along with how I should work with the SaltStack team moving forward as well.


Best Regards,

Robert Murley


On Monday, August 5, 2013 11:40:50 PM UTC-4, Robert Murley wrote:

David Boucha

unread,
Aug 20, 2013, 7:38:58 PM8/20/13
to salt users list
This is great! I'm thinking that the next step is to get the grains to be correctly identified for AIX.
I imagine you saw several spots in the output where there were KeyErrors in the grains, such as:
"KeyError: 'osrelease' "

If you look in the Salt repo under salt/grains/core.py  you'll see how all the default grains are determined.


--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Kristian Berg

unread,
Aug 21, 2013, 2:43:54 AM8/21/13
to salt-...@googlegroups.com
I've also gotten the salt-minion to run on AIX. I think I did it by getting the packages as described below:

* Salt (spec)
    * python-devel (perzl rpm)
        * python-libs (perzl rpm)
        * python (perzl rpm)
        * gmp (toolbox rpm)
        * gmp-devel (toolbox rpm)
        * db4 (perzl rpm)
        * db4-cxx (perzl rpm)
        * sqlite (perzl rpm)
        * zlib (perzl rpm)
        * zlib-devel (perzl rpm)
    * python-crypto (source)
    * python-zmq (source)
        * zeromq (source)
    * python-jinja2 (source)
        * MarkupSafe (source)
    * python-PyYAML (perzl rpm)
        * libyaml (perzl rpm)
    * python-m2crypto (source)
        * swig (perzl rpm)
            * PCRE (perzl rpm)
        * libgcrypt (perzl rpm)
        * libgcrypt-devel (perzl rpm)
    * python-msgpack (source)
    * getopt (perzl rpm)
        * coreutils (perzl rpm)
        * grep (perzl rpm)
        * tcsh (perzl rpm)

(this is free from memory, so YMMV)

For salt itself, I copied the rpm spec-file from pkg/rpm/salt.spec and altered it a bit. The rpm on aix is quite archaic, so it requires some tweaking. It's attached, regardless. I've looked a bit into the grains too and I'll put up some changes on github as soon as it's functional. I have access to aix 5.3, 6.1 and 7.1 for testing, if needed.
salt.spec

David Boucha

unread,
Aug 21, 2013, 3:05:05 AM8/21/13
to salt users list
This is fantastic!   Looking forward to your grains additions.

Does AIX have a package manager? Or do you have to manually install rpms?


--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Kristian Berg

unread,
Aug 21, 2013, 3:16:56 AM8/21/13
to salt-...@googlegroups.com


On Wednesday, August 21, 2013 9:05:05 AM UTC+2, David Boucha wrote:
This is fantastic!   Looking forward to your grains additions.

Does AIX have a package manager? Or do you have to manually install rpms?



Sadly, it doesn't have a dependency solver like yum. So all rpms have to be downloaded and installed manually. AIX ships with rpm 3.0.5. Don't think yum will function with that.

David Boucha

unread,
Aug 21, 2013, 3:21:56 AM8/21/13
to salt users list
ok, cool. I think it would be really useful then to use Salt to manage all the RPMs on AIX


--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Antoine Pitrou

unread,
Aug 21, 2013, 3:59:43 AM8/21/13
to salt-...@googlegroups.com
Le Tue, 20 Aug 2013 14:34:31 -0700 (PDT),
Robert Murley <rdmu...@gmail.com> a
écrit :
> Antoine,
>
> Sorry it has taken some time to get all of the necessary pieces
> installed on the AIX 7.1 development system I was debugging earlier
> with the broken Python 2.7.5 hashlib module from the Bull
> freeware/Perzl RPM install. I was able to successfully build a
> custom 32-bit Python 2.7.5 on AIX 7.1 with a working hashlib module
> shown below

Is the Bull install a 32-bit build too?
You can check by running e.g.
$ python -c "import sys; print sys.maxsize"

If so, then I guess you can complain to them about the hashlib issue
(way to show that "enterprise" software is superior, btw :-)).

Regards

Antoine.


Robert Murley

unread,
Aug 22, 2013, 1:55:15 PM8/22/13
to salt-...@googlegroups.com
Kristian,

First, thanks for the information.  I will test out the Python 2.7.5 RPM from Perzl and compare it to the one from Bull freeware which basically comes from the Perzl source with fixes applied as I can see from the accompanying SRC RPM.  Perhaps the Bull freeware folks aren't checking as thoroughly when they build their Python RPMs for AIX and why SHA256 was broken for me with the hashlib module when I originally started.

Second, are you planning to use Salt on AIX as a root user for installation of RPM packages and remote execution on Minions for system administration activities?  Will you have access to root in your Salt use case even if you don't run Salt as a root user?  I'm curious to know because my use case will never have access to root user and will always be using a dedicated middleware system user for Salt to install, manage and support the middleware components.  Likewise the Salt environment/runtime will be maintained within a Python virtualenv that is portable to other AIX LPARs/Servers without having to rebuild things for additional AIX 6.1 or 7.1 installs/setups once a complete Master or Minion environment/runtime is successfully built for the target AIX os level similar to an Apache, Java, WebSphere or IHS install on AIX where no RPM or native AIX LPP product fileset install takes place.  Not having access to root on a system while trying to get Salt up and running can be challenging when having to work with system admins who have the root access that you need to work with/through on any software dependencies/components needed to get Salt up and running on AIX.

Third, what compiler type were you using for installing from source (XL C/C++  or GCC)?  I'm using GCC for everything in my situation and I know that the Perzl packages are mostly built using the IBM XL C/C++ compiler which some folks may not have access too, but can get via a 30 day trial the last time I looked.  Either way, curious to know what compiler type you are using.

Lastly, my current Salt Master/Minion is using a custom non-root 32-bit build of Python 2.7.5 source in a non-standard location such as /apps/Tools/python-2.7.5 for example which my Python virtualenv was installed from and using so currently I can go to other AIX systems without having to install a Python RPM or build from source with a binary archive package like a zip or tar file.

Robert Murley

unread,
Aug 22, 2013, 2:29:32 PM8/22/13
to salt-...@googlegroups.com
David,

I made some updates to the following Salt files on my side to correctly identify missing grains for AIX

salt.grains.core
salt.utils.__init__

the cpu_flags could use some more work, but here is a sample output of the grains.ls and grains.items below

$ salt -c /apps/Tools/saltstack-wsadmin/etc/salt 'aixdev71' grains.ls 
aixdev71: 
    - cpu_flags 
    - cpu_model 
    - cpuarch 
    - defaultencoding 
    - defaultlanguage 
    - domain 
    - fqdn 
    - gpus 
    - host 
    - id 
    - ip_interfaces 
    - ipv4 
    - kernel 
    - kernelrelease 
    - localhost 
    - master 
    - mem_total 
    - nodename 
    - num_cpus 
    - num_gpus 
    - os 
    - os_family 
    - osrelease 
    - osversion 
    - path 
    - ps 
    - pythonpath 
    - pythonversion 
    - saltpath 
    - saltversion 
    - server_id 
    - shell 
    - virtual 
(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages 
$ salt -c /apps/Tools/saltstack-wsadmin/etc/salt 'aixdev71' grains.items 
aixdev71: 
  cpu_flags: ['frequency   4004000000     Processor Speed       ' 'smt_enabled true           Processor SMT enabled ' 'smt_threads 4              Processor SMT threads ' 'state       enable         Processor state       ' 'type        PowerPC_POWER7 Processor type'] 
  cpu_model: PowerPC_POWER7 
  cpuarch: powerpc 
  defaultencoding: ISO8859-1 
  defaultlanguage: C 
  domain: domain.com 
  gpus: 
  host: aixdev71 
  id: aixdev71 
  ip_interfaces: {'en2': ['10.14.81.67'], 'lo0': ['127.0.0.1']} 
  ipv4: 
      10.14.81.67 
      127.0.0.1 
  kernel: AIX 
  kernelrelease: 1 
  localhost: aixdev71.domain.com 
  master: 10.14.81.67 
  mem_total: 12288 
  nodename: aixdev71 
  num_cpus: 2 
  num_gpus: 0 
  os: AIX 
  os_family: AIX 
  osrelease: 7.1.0.0 
  osversion: 7100-02 
  path: /apps/Tools/saltstack-wsadmin/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/home/wsadmin/bin:/usr/bin/X11:/sbin:. 
  ps: ps -efH 
  pythonpath: 
      /apps/Tools/saltstack-wsadmin/bin 
      /apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/msgpack_python-0.3.0-py2.7-aix-7.1.egg 
      /apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/PyYAML-3.10-py2.7-aix-7.1.egg 
      /apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/MarkupSafe-0.18-py2.7.egg 
      /apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/Jinja2-2.7.1-py2.7.egg 
      /apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/M2Crypto-0.21.1-py2.7-aix-7.1.egg 
      /apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/CherryPy-3.2.4-py2.7.egg 
      /apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/halite-0.0.1-py2.7.egg 
      /apps/Tools/RDM/Python/salt-api-0.8.2 
      /apps/Tools/saltstack-wsadmin/lib/python27.zip 
      /apps/Tools/saltstack-wsadmin/lib/python2.7 
      /apps/Tools/saltstack-wsadmin/lib/python2.7/plat-aix7 
      /apps/Tools/saltstack-wsadmin/lib/python2.7/lib-tk 
      /apps/Tools/saltstack-wsadmin/lib/python2.7/lib-old 
      /apps/Tools/saltstack-wsadmin/lib/python2.7/lib-dynload 
      /apps/Tools/python-2.7.5/lib/python2.7 
      /apps/Tools/python-2.7.5/lib/python2.7/plat-aix7 
      /apps/Tools/python-2.7.5/lib/python2.7/lib-tk 
      /apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages 
  pythonversion: 2.7.5.final.0 
  saltpath: /apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages/salt 
  saltversion: 0.16.2 
  server_id: 1165716931
  shell: /usr/bin/ksh 
  virtual: physical 
(saltstack-wsadmin)wsadmin@aixdev71:/apps/Tools/saltstack-wsadmin/lib/python2.7/site-packages 

David Boucha

unread,
Aug 22, 2013, 2:47:38 PM8/22/13
to salt users list
that's great, Robert!


--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Robert Murley

unread,
Aug 22, 2013, 2:52:58 PM8/22/13
to salt-...@googlegroups.com
Antoine,

Yes, the Bull freeware install from RPM for 2.7.5 is a 32-bit build shown below:

wsadmin@aixdev71:/home/wsadmin 
$ python -c "import sys; print sys.maxsize"   
wsadmin@aixdev71:/home/wsadmin 
$ python 
Python 2.7.5 (default, Jul 15 2013, 16:52:51) [C] on aix6 
Type "help", "copyright", "credits" or "license" for more information. 
>>> import hashlib 
>>> hashlib.sha256(b"x"*200000).hexdigest() 
Illegal instruction(coredump) 
wsadmin@aixdev71:/home/wsadmin 


Best Regards,

Robert Murley

Kristian Berg

unread,
Sep 17, 2013, 9:10:48 AM9/17/13
to salt-...@googlegroups.com


On Thursday, August 22, 2013 8:52:58 PM UTC+2, Robert Murley wrote:
Antoine,

Yes, the Bull freeware install from RPM for 2.7.5 is a 32-bit build shown below:

wsadmin@aixdev71:/home/wsadmin 
$ python -c "import sys; print sys.maxsize"   
wsadmin@aixdev71:/home/wsadmin 
$ python 
Python 2.7.5 (default, Jul 15 2013, 16:52:51) [C] on aix6 
Type "help", "copyright", "credits" or "license" for more information. 
>>> import hashlib 
>>> hashlib.sha256(b"x"*200000).hexdigest() 
Illegal instruction(coredump) 
wsadmin@aixdev71:/home/wsadmin 


I've compiled the dependency tree and successfully run the salt minion now on aix 5.3, 6.1 and 7.1. I added some grains, a rpm spec and a really basic startup script to my repository at https://github.com/kriberg/salt/. I had some interesting issues compiling up the dependencies, as others probably have experienced too. I've made some assorted specs and RPMs for those too. I'll post them somewhere, so you might recompile from the srpms or just download the rpms directly.

Colton Myers

unread,
Sep 17, 2013, 11:26:28 AM9/17/13
to salt-...@googlegroups.com
Awesome, thanks for posting that!

--
Colton Myers


--

David Boucha

unread,
Sep 18, 2013, 8:50:58 PM9/18/13
to salt users list
Kristian,

That is fantastic! Is this something you'd be willing to help us get in the official docs? We'd really like to have better support for AIX.

Let me know what you think.

Dave Boucha


On Tue, Sep 17, 2013 at 7:10 AM, Kristian Berg <kri...@gmail.com> wrote:

--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Pedro Algarvio

unread,
Sep 19, 2013, 5:55:01 AM9/19/13
to salt-...@googlegroups.com
On 06-08-2013 23:04, Robert Murley wrote:
... as well where you need to specify the configuration file location option (-c <path>) with the Salt commands

As of the upcoming 0.17.0, you can provide configuration paths while building/installing/packaging salt, even Salt's configuration directory.

Just try python setup install --help on the current develop branch or on the upcoming 0.17.0 tarball.


Best Regards,
--
Pedro Algarvio Pedro Algarvio
Email me @algarvio.me // Find me on LinkedIn // Find me on Twitter // Find me on GitHub // Find me on BitBucket // Find me on Ohloh // Like my work? Tip me on GitTip

Robert Murley

unread,
Sep 23, 2013, 6:55:24 PM9/23/13
to salt-...@googlegroups.com
An update on anyone following this thread I started last month.  I was originally using a Python 2.7.5 RPM package install from Bull freeware that was broken for hashlib as previously discussed.  I got around this problem by building my own Python 2.7.5 from source on AIX 6.1 and 7.1 versions.  We don't use the older 5.3 version for anything so I didn't bother with that.  I was able to install and setup a Salt 0.16.x minion and master on AIX working as expected.  The Salt code for grains needed to be updated for properly reporting on an AIX server running the minion.  However, there is another source for obtaining a good Python 2.7.5 RPM package install for AIX 6.1 and 7.1 (5.3 as well if desired) from Perzl.org (at http://www.perzl.org/aix/index.php?n=Main.Python) that doesn't have the broken hashlib problem.  Thus, if you wanted to use SaltStack on AIX without building your own Python from source you could go the Perzl.org route for doing so.  However, for my use case I will never have root access on an AIX server and needed a solution that will allow me to use Salt for managing and supporting middleware components owned and running as a non-root user.  Is that scenario I didn't want Python installed/managed by root user where it would be installed/managed by a dedicated middleware administrative user that would manage/control all middleware components.  Therefore building Python 2.7.5 from source and installing it in a dedicated file system/location owned by the middleware administrative user was the best way to go so we could maintain/patch/upgrade Python going forward without any root user dependency just like our middleware components.  That being said if you are going to build Python from source for AIX there are some AIX specific patches you can include with your custom build  (documented at http://svn.python.org/projects/python/branches/release27-maint/Misc/README.AIX) as needed or desired.  You can also choose between between 32-bit and 64-bit when using Python on AIX where 64-bit testing hasn't been fully done on AIX and we are currently using a 32-bit build which has been fully tested.

Once Python 2.7.5 is available for use on AIX as root user install or custom user install then the packages/dependencies needed for a Salt minion or master can be setup/installed in a global manner or within virtualenv.  We are using a virtualenv in our use case situation explained above.  There are certain things which need to be done for AIX and some of it depends on the compiler type being used with AIX.  I have used both the native XL C/C++ and GNU C/C++ compilers for AIX where each one is a little different for setting up Salt on AIX.  We have chosen to go with the free GNU C/C++ option for AIX and that is what I have currently used for creating my Salt master and minion environments on AIX 6.1 and 7.1 versions to date.  I'm in the process of putting together documentation for SaltStack efforts on AIX and can share them with the SaltStack team for review and any questions that may come up from it.  Once Salt is setup and working on AIX there are other things that you need to be aware such as psutil Python package not being available for AIX and used by certain Salt modules such as salt.modules.ps for example.  There are ways to get the same information, but it involves modification of existing SaltStack code.  I also have external Active Directory LDAP integrated with a Salt master and minion on AIX that would be helpful for others interested in doing so where a minion isn't required on the LDAP server as well.  I will open additional SaltStack posts on these specific subject matters in the future along with sharing notes.  I will setup a GitHub account sometime this week and start collaborating with others interested in using SaltStack on AIX.

Kristian Berg

unread,
Sep 24, 2013, 10:03:30 AM9/24/13
to salt-...@googlegroups.com
I'm having a slight issue on AIX 5.3 actually. I think it might be caused by a bug in AIX or zeromq though.

I wrote a small shell script to package salt and update my aix test server:

FILES="salt-$VERSION.noarch.rpm salt-minion-$VERSION.noarch.rpm"
for I in $FILES; do
    salt aix53server cp.hash_file "/opt/freeware/src/packages/RPMS/noarch/$I"
    salt aix53server cp.push "/opt/freeware/src/packages/RPMS/noarch/$I"
    cp /var/cache/salt/master/minions/aix53server/files/opt/freeware/src/packages/RPMS/noarch/$I /srv/salt/files
    md5sum /srv/salt/files/$I
    salt aix71server cp.get_file "salt://files/$I" "/root/$I"
    salt aix71server cp.hash_file "/root/$I"
done
exit



This showed a rather interesting behaviour though:


+ FILES='salt-0.16.4-1.aix5.3.noarch.rpm salt-minion-0.16.4-1.aix5.3.noarch.rpm'
+ for I in '$FILES'
+ salt aix53server cp.hash_file /opt/freeware/src/packages/RPMS/noarch/salt-0.16.4-1.aix5.3.noarch.rpm
aix53server:
    ----------
    hash_type:
        md5
    hsum:
        39592c073ab9fa331d36141fc7add556
+ salt aix53server cp.push /opt/freeware/src/packages/RPMS/noarch/salt-0.16.4-1.aix5.3.noarch.rpm
aix53server:
    True
+ cp /var/cache/salt/master/minions/aix53server/files/opt/freeware/src/packages/RPMS/noarch/salt-0.16.4-1.aix5.3.noarch.rpm /srv/salt/files
+ md5sum /srv/salt/files/salt-0.16.4-1.aix5.3.noarch.rpm
307c33d52927107c5d34590c6dba2992  /srv/salt/files/salt-0.16.4-1.aix5.3.noarch.rpm
+ salt aix71server cp.get_file salt://files/salt-0.16.4-1.aix5.3.noarch.rpm /root/salt-0.16.4-1.aix5.3.noarch.rpm
aix71server:
    /root/salt-0.16.4-1.aix5.3.noarch.rpm
+ salt aix71server cp.hash_file /root/salt-0.16.4-1.aix5.3.noarch.rpm
aix71server:
    ----------
    hash_type:
        md5
    hsum:
        307c33d52927107c5d34590c6dba2992
+ for I in '$FILES'
+ salt aix53server cp.hash_file /opt/freeware/src/packages/RPMS/noarch/salt-minion-0.16.4-1.aix5.3.noarch.rpm
aix53server:
    ----------
    hash_type:
        md5
    hsum:
        294df291e8c6a18dfef608117bf576b5
+ salt aix53server cp.push /opt/freeware/src/packages/RPMS/noarch/salt-minion-0.16.4-1.aix5.3.noarch.rpm
aix53server:
    True
+ cp /var/cache/salt/master/minions/aix53server/files/opt/freeware/src/packages/RPMS/noarch/salt-minion-0.16.4-1.aix5.3.noarch.rpm /srv/salt/files
+ md5sum /srv/salt/files/salt-minion-0.16.4-1.aix5.3.noarch.rpm
294df291e8c6a18dfef608117bf576b5  /srv/salt/files/salt-minion-0.16.4-1.aix5.3.noarch.rpm
+ salt aix71server cp.get_file salt://files/salt-minion-0.16.4-1.aix5.3.noarch.rpm /root/salt-minion-0.16.4-1.aix5.3.noarch.rpm
aix71server:
    /root/salt-minion-0.16.4-1.aix5.3.noarch.rpm
+ salt aix71server cp.hash_file /root/salt-minion-0.16.4-1.aix5.3.noarch.rpm
aix71server:
    ----------
    hash_type:
        md5
    hsum:
        294df291e8c6a18dfef608117bf576b5
+ exit

Seems like the files transfered from the aix5.3 minion to the linux master gets corrupted. Transferring from the master to an aix 7.1 minion works fine though. Note that this is only for a single file too, not both of them. I couldn't get zeromq to compile on 5.3, so I used binaries compiled on 6.1 instead. Could be the cause. Some of the output has been censored, fyi.

Kristian Berg

unread,
Sep 26, 2013, 3:29:28 AM9/26/13
to salt-...@googlegroups.com


On Tuesday, September 24, 2013 4:03:30 PM UTC+2, Kristian Berg wrote:
Seems like the files transfered from the aix5.3 minion to the linux master gets corrupted. Transferring from the master to an aix 7.1 minion works fine though. Note that this is only for a single file too, not both of them. I couldn't get zeromq to compile on 5.3, so I used binaries compiled on 6.1 instead. Could be the cause. Some of the output has been censored, fyi.

Getting this behaviour from all aix minions now:
aix61server:

    ----------
    hash_type:
        md5
    hsum:
        39592c073ab9fa331d36141fc7add556
aix61server:
    True
307c33d52927107c5d34590c6dba2992  /var/cache/salt/master/minions/aix61server/files/tmp/salt-0.16.4-1.aix5.3.noarch.rpm
aix61server:

    ----------
    hash_type:
        md5
    hsum:
        294df291e8c6a18dfef608117bf576b5
aix61server:
    True
294df291e8c6a18dfef608117bf576b5  /var/cache/salt/master/minions/aix61server/files/tmp/salt-minion-0.16.4-1.aix5.3.noarch.rpm

aix53server:
    ----------
    hash_type:
        md5
    hsum:
        39592c073ab9fa331d36141fc7add556
aix53server:
    True
307c33d52927107c5d34590c6dba2992  /var/cache/salt/master/minions/aix53server/files/tmp/salt-0.16.4-1.aix5.3.noarch.rpm

aix53server:
    ----------
    hash_type:
        md5
    hsum:
        294df291e8c6a18dfef608117bf576b5
aix53server:
    True
294df291e8c6a18dfef608117bf576b5  /var/cache/salt/master/minions/aix53server/files/tmp/salt-minion-0.16.4-1.aix5.3.noarch.rpm

aix71server:
    ----------
    hash_type:
        md5
    hsum:
        39592c073ab9fa331d36141fc7add556
aix71server:
    True
307c33d52927107c5d34590c6dba2992  /var/cache/salt/master/minions/aix71server/files/tmp/salt-0.16.4-1.aix5.3.noarch.rpm

aix71server:
    ----------
    hash_type:
        md5
    hsum:
        294df291e8c6a18dfef608117bf576b5
aix71server:
    True
294df291e8c6a18dfef608117bf576b5  /var/cache/salt/master/minions/aix71server/files/tmp/salt-minion-0.16.4-1.aix5.3.noarch.rpm

Anyone else able to test something like this? As you can see, it doesn't mess up both binaries, only one of them. Which is weird.

David Boucha

unread,
Sep 26, 2013, 9:27:36 AM9/26/13
to salt users list

I think this is a big unrelated to aix. I believe this has been fixed in git just a day or two ago

--

Kristian Berg

unread,
Sep 27, 2013, 4:34:20 AM9/27/13
to salt-...@googlegroups.com


On Thursday, September 26, 2013 3:27:36 PM UTC+2, David Boucha wrote:

I think this is a big unrelated to aix. I believe this has been fixed in git just a day or two ago



Not fixed in the develop-branch in upstream as of just now. If it's something transforming during transfer, maybe it's more reasonable to look at the serialization in msgpack, the AES encryption in pycrypto or the transmission in zmq. I'll try to write a test program  for the first two and compare to output on linux.

David Boucha

unread,
Sep 27, 2013, 7:34:30 PM9/27/13
to salt users list
Ah, you've nailed it. It is most likely the serialization in msgpack. We had the same problem when porting to arm and sparc


--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Kristian Berg

unread,
Nov 28, 2013, 4:39:52 AM11/28/13
to salt-...@googlegroups.com
Been a while since the last update, but I pushed my latest changes to my repo at https://github.com/kriberg/salt

Just added pkg.list_pkgs, pkg.install and pkg.remove. This works with both the rpm and the "installp" backend. Here's a partial copypaste from output:

salt-call pkg.install sources='[{"Java7_64.jre": "/tmp/foo/Java7_64.jre"},{"top": "http://www.oss4aix.org/download/RPMS/top/top-3.8beta1-2.aix5.1.ppc.rpm"}]'
local:
    ----------
    Java7_64.jre:
        ----------
        new:
            7.0.0.100
        old:
           
    top:
        ----------
        new:
            3.8beta1-2
        old:


The java package is an installp fileset, while top is a rpm, as you can see. I'm having trouble using the salt:// protocol to fetch files from the master though. If anybody is willing to take a glance at https://github.com/kriberg/salt/blob/develop/salt/modules/aix_pkg.py and explain why, I'd much appreciate it.

In addition to packages, there's user, group and crontab support. User/group use mkuser and mkgroup with "-R files", instead of the default useradd/groupadd.

Your mileage may vary.

--
[Kristian Berg]

Kristian Berg

unread,
Dec 3, 2013, 6:40:10 AM12/3/13
to salt-...@googlegroups.com
msgpack still doesn't build properly on aix:
$ python setup.py build
running build
running build_py
creating build
creating build/lib.aix-7.1-2.7
creating build/lib.aix-7.1-2.7/msgpack
copying msgpack/__init__.py -> build/lib.aix-7.1-2.7/msgpack
copying msgpack/_version.py -> build/lib.aix-7.1-2.7/msgpack
copying msgpack/exceptions.py -> build/lib.aix-7.1-2.7/msgpack
copying msgpack/fallback.py -> build/lib.aix-7.1-2.7/msgpack
running build_ext
building 'msgpack._packer' extension
creating build/temp.aix-7.1-2.7
creating build/temp.aix-7.1-2.7/msgpack
xlc_r -ma -I/opt/freeware/include -DAIX_GENUINE_CPLUSCPLUS -Wl,-brtl -qmaxmem=262144 -DSYSV -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_AIX52 -D_AIX53 -D_AIX61 -D_ALL_SOURCE -DFUNCPROTO=15 -O -I/opt/freeware/include -DNDEBUG -O -D__BIG_ENDIAN__=1 -I. -I/opt/freeware/include/python2.7 -c msgpack/_packer.cpp -o build/temp.aix-7.1-2.7/msgpack/_packer.o
xlC xlc_r -ma -I/opt/freeware/include -DAIX_GENUINE_CPLUSCPLUS -Wl,-brtl -bI:/opt/freeware/lib/python2.7/config/python.exp -L/opt/freeware/lib build/temp.aix-7.1-2.7/msgpack/_packer.o -o build/lib.aix-7.1-2.7/msgpack/_packer.so
xlC: 1501-228 (W) input file xlc_r not found
WARNING: Failed to compile extensiom modules.
msgpack uses fallback pure python implementation.
command 'xlC' failed with exit status 252
building 'msgpack._unpacker' extension
xlc_r -ma -I/opt/freeware/include -DAIX_GENUINE_CPLUSCPLUS -Wl,-brtl -qmaxmem=262144 -DSYSV -D_AIX -D_AIX32 -D_AIX41 -D_AIX43 -D_AIX51 -D_AIX52 -D_AIX53 -D_AIX61 -D_ALL_SOURCE -DFUNCPROTO=15 -O -I/opt/freeware/include -DNDEBUG -O -D__BIG_ENDIAN__=1 -I. -I/opt/freeware/include/python2.7 -c msgpack/_unpacker.cpp -o build/temp.aix-7.1-2.7/msgpack/_unpacker.o
"msgpack/unpack_template.h", line 173.13: 1540-0063 (S) The text "..." is unexpected.
"msgpack/unpack_template.h", line 75.19: 1540-0700 (I) The previous message was produced while processing "unpack_execute<1>(unpack_context *, const char *, size_t, size_t *)".
"msgpack/unpack_template.h", line 468.45: 1540-0700 (I) The previous message was produced while processing "unpack_construct".
"msgpack/unpack_template.h", line 173.13: 1540-0063 (S) The text "..." is unexpected.
"msgpack/unpack_template.h", line 75.19: 1540-0700 (I) The previous message was produced while processing "unpack_execute<0>(unpack_context *, const char *, size_t, size_t *)".
"msgpack/unpack_template.h", line 469.40: 1540-0700 (I) The previous message was produced while processing "unpack_skip".
"msgpack/unpack_template.h", line 433.29: 1540-0063 (S) The text "..." is unexpected.
"msgpack/unpack_template.h", line 412.19: 1540-0700 (I) The previous message was produced while processing "unpack_container_header<144,220>(unpack_context *, const char *, size_t, size_t *)".
"msgpack/unpack_template.h", line 470.46: 1540-0700 (I) The previous message was produced while processing "read_array_header".
"msgpack/unpack_template.h", line 433.29: 1540-0063 (S) The text "..." is unexpected.
"msgpack/unpack_template.h", line 412.19: 1540-0700 (I) The previous message was produced while processing "unpack_container_header<128,222>(unpack_context *, const char *, size_t, size_t *)".
"msgpack/unpack_template.h", line 471.44: 1540-0700 (I) The previous message was produced while processing "read_map_header".
WARNING: Failed to compile extensiom modules.
msgpack uses fallback pure python implementation.

I think distribute (setuptools) mixes CXX and LDSHARED for compiling the c++ sources, while it should've use LDCXXSHARED. If I manually change _sysconfigdata.py and change "ld_so_aix xlc_r" to just "ld_so_aix", _packer.cpp compiles fine. Linking fails on the other hand:
xlC -ma -I/opt/freeware/include -DAIX_GENUINE_CPLUSCPLUS -Wl,-brtl -bI:/opt/freeware/lib/python2.7/config/python.exp -L/opt/freeware/lib build/temp.aix-7.1-2.7/msgpack/_packer.o -o build/lib.aix-7.1-2.7/msgpack/_packer.so
ld: 0711-317 ERROR: Undefined symbol: .main
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
WARNING: Failed to compile extensiom modules.
msgpack uses fallback pure python implementation.


I've reported the issue on the msgpack-python github tracker, so hopefully somebody looks into it at some point.

R. Marc

unread,
Jan 9, 2014, 11:04:10 AM1/9/14
to salt-...@googlegroups.com
I was able to get msgpack to compile by commenting out the following define in msgpack/unpack_template.h (aix 6.1):

/*
#ifndef USE_CASE_RANGE
#if !defined(_MSC_VER)
#define USE_CASE_RANGE
#endif
#endif
*/

This is with an unmodified _sysconfigdata.py.

Salt core dumps, however.  I'm not sure if it's related to this, yet, or not.

R. Marc

R. Marc

unread,
Jan 9, 2014, 1:59:42 PM1/9/14
to salt-...@googlegroups.com
The core seems to be an issue in pyzmq.

R. Marc

unread,
Jan 14, 2014, 10:18:18 PM1/14/14
to salt-...@googlegroups.com
I now have it working on AIX. Here is the log of what I did (this assumes a custom install and a native AIX compiler):

export LDFLAGS=-L/<PATH>/salt/python/lib
export CPPFLAGS=-I/<PATH>/salt/python/include

pcre: ./configure --prefix=/<PATH>/salt/python
swig: ./configure --prefix=/<PATH>/salt/python --with-pcre-prefix=/<PATH>/salt/python
openssl: ./config shared --prefix=/<PATH>/salt/python
gmp: ./configure --prefix=/<PATH>/salt/python
yaml: ./configure --prefix=/<PATH>/salt/python
Python: ./configure --prefix=/<PATH>/salt/python
zeromq: ./configure --prefix=/<PATH>/salt/python
setuptools: python setup.py build; python setup.py install
msgpack-python: python setup.py build; python setup.py install
pycrypto: (apply patch for aix python-crypto-2.6-aix.patch from src RPM: http://www.perzl.org/aix/index.php?n=Main.Python-crypto)
        ln -s /<PATH>/salt/python/lib/python2.7/config Modules
        python setup.py build; python setup.py install
        Move system headers to after local headers
        also remove DES DES3 in setup.py (who needs it?) in setyp.py.
pyzmq: ln -s /<PATH>/salt/python/lib/python2.7/config Modules
        python setup.py build build_ext --zmq=/<PATH>/salt/python;
        python setup.py install build_ext --zmq=/<PATH>/salt/python
PyYAML: python setup.py build; python setup.py install
MarkupSafe: python setup.py build; python setup.py install
Jinja2: python setup.py build; python setup.py install
M2Crypto: ln -s /<PATH>/salt/python/lib/python2.7/config Modules
        python setup.py install build_ext --openssl=/<PATH>/salt/python
        python setup.py install build_ext --openssl=/<PATH>/salt/python
salt: python setup.py build; python setup.py install

Mike Ainsworth

unread,
Jan 14, 2014, 10:35:23 PM1/14/14
to salt-...@googlegroups.com
Thanks Marc

R. Marc

unread,
Jan 14, 2014, 10:48:33 PM1/14/14
to salt-...@googlegroups.com
Forgot the list of packages:
Jinja2-2.7.1.tar.gz          MarkupSafe-0.18.tar.gz       gmp-5.1.3.tar.bz2            pycrypto-2.6.1               pyzmq-14.0.1.tar.gz          setuptools-2.1.tar.gz
M2Crypto-0.21.1.tar.gz       PyYAML-3.10.tar.gz           msgpack-python-0.4.0.tar.gz  pycrypto-2.6.1.tar.gz        salt-0.17.4.tar.gz           zeromq-4.0.3.tar.gz

R. Marc

unread,
Jan 14, 2014, 10:56:31 PM1/14/14
to salt-...@googlegroups.com
I'm not sure what happened to openssl, but it was the latest (1.0.1l).

R. Marc

Oz Akan

unread,
Oct 14, 2014, 1:23:01 PM10/14/14
to salt-...@googlegroups.com
hi, 

Is there a plan for AIX support to be documented in salt documents?

thanks,
Oz
Reply all
Reply to author
Forward
0 new messages