New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ancient shell substitution on AIX & support BFFs #72

Merged
merged 2 commits into from Dec 9, 2014

Conversation

Projects
None yet
6 participants
@juliandunn
Contributor

juliandunn commented Dec 9, 2014

AIX's sh is too old to do the kind of trickery in #49 . Instead you'll get:

install.sh[172]: platform_version="${uname -v}.${uname -r}": 0403-011 The specified substitution is not valid for this command.

Also, added support for installing bffs

@juliandunn juliandunn changed the title from Fix ancient shell substitution on AIX to Fix ancient shell substitution on AIX & support BFFs Dec 9, 2014

@juliandunn

This comment has been minimized.

Show comment
Hide comment
@juliandunn

juliandunn Dec 9, 2014

Contributor

Please review my installp args @scotthain

Contributor

juliandunn commented Dec 9, 2014

Please review my installp args @scotthain

@lamont-granquist

This comment has been minimized.

Show comment
Hide comment
@lamont-granquist

lamont-granquist Dec 9, 2014

Contributor

yeah that looks correct.

Contributor

lamont-granquist commented Dec 9, 2014

yeah that looks correct.

@scotthain

This comment has been minimized.

Show comment
Hide comment
@scotthain

scotthain Dec 9, 2014

Contributor

👍

Contributor

scotthain commented Dec 9, 2014

👍

lamont-granquist added a commit that referenced this pull request Dec 9, 2014

Merge pull request #72 from juliandunn/aix-shell-fix
Fix ancient shell substitution on AIX & support BFFs

@lamont-granquist lamont-granquist merged commit 619f79e into chef:master Dec 9, 2014

@juliandunn juliandunn deleted the juliandunn:aix-shell-fix branch Dec 9, 2014

@clintoncwolfe

This comment has been minimized.

Show comment
Hide comment
@clintoncwolfe

clintoncwolfe Jan 5, 2015

OmniOS / solaris2 was weeping over "${uname -v}" too - thanks!

clintoncwolfe commented Jan 5, 2015

OmniOS / solaris2 was weeping over "${uname -v}" too - thanks!

@chris-rock

This comment has been minimized.

Show comment
Hide comment
@chris-rock

chris-rock Jan 22, 2015

+1, wait to see this live deployed. This new script works like a charm. Thanks @juliandunn and @scotthain

chris-rock commented Jan 22, 2015

+1, wait to see this live deployed. This new script works like a charm. Thanks @juliandunn and @scotthain

@btm

This comment has been minimized.

Show comment
Hide comment
@btm

btm Feb 10, 2015

Member

This has been deployed to preproduction for testing:

curl http://www-preprod.chef.io/chef/install.sh | sh

output on the AIX box I was given for testing:

#curl http://www-preprod.chef.io/chef/install.sh | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 18393  100 18393    0     0  34679      0 --:--:-- --:--:-- --:--:-- 38239
Downloading Chef  for aix...
downloading http://www-preprod.chef.io/chef/metadata?v=&prerelease=false&nightlies=false&p=aix&pv=6.1&m=powerpc
  to file /tmp/install.sh.3866834/metadata.txt
trying wget...
ERROR 404
Omnitruck artifact does not exist for version  on platform aix

Either this means:
   - We do not support aix
   - We do not have an artifact for

This is often the latter case due to running a prerelease or RC version of chef
or a gem version which was only pushed to rubygems and not omnitruck.

You may be able to set your knife[:bootstrap_version] to the most recent stable
release of Chef to fix this problem (or the most recent stable major version number).

In order to test the version parameter, adventurous users may take the Metadata URL
below and modify the '&v=<number>' parameter until you successfully get a URL that
does not 404 (e.g. via curl or wget).  You should be able to use '&v=11' or '&v=12'
succesfully.

If you cannot fix this problem by setting the bootstrap_version, it probably means
that aix is not supported.

Metadata URL: http://www-preprod.chef.io/chef/metadata?v=&prerelease=false&nightlies=false&p=aix&pv=6.1&m=powerpc
Member

btm commented Feb 10, 2015

This has been deployed to preproduction for testing:

curl http://www-preprod.chef.io/chef/install.sh | sh

output on the AIX box I was given for testing:

#curl http://www-preprod.chef.io/chef/install.sh | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 18393  100 18393    0     0  34679      0 --:--:-- --:--:-- --:--:-- 38239
Downloading Chef  for aix...
downloading http://www-preprod.chef.io/chef/metadata?v=&prerelease=false&nightlies=false&p=aix&pv=6.1&m=powerpc
  to file /tmp/install.sh.3866834/metadata.txt
trying wget...
ERROR 404
Omnitruck artifact does not exist for version  on platform aix

Either this means:
   - We do not support aix
   - We do not have an artifact for

This is often the latter case due to running a prerelease or RC version of chef
or a gem version which was only pushed to rubygems and not omnitruck.

You may be able to set your knife[:bootstrap_version] to the most recent stable
release of Chef to fix this problem (or the most recent stable major version number).

In order to test the version parameter, adventurous users may take the Metadata URL
below and modify the '&v=<number>' parameter until you successfully get a URL that
does not 404 (e.g. via curl or wget).  You should be able to use '&v=11' or '&v=12'
succesfully.

If you cannot fix this problem by setting the bootstrap_version, it probably means
that aix is not supported.

Metadata URL: http://www-preprod.chef.io/chef/metadata?v=&prerelease=false&nightlies=false&p=aix&pv=6.1&m=powerpc
@btm

This comment has been minimized.

Show comment
Hide comment
@btm

btm Feb 10, 2015

Member
Seth Chisamore 8:53 PM: @btm so up until now AIX releases are placed into prod Omnitruck by hand and don't exist in preprod. So your query works fine in prod:
➜  curl "http://www.chef.io/chef/metadata?v=&prerelease=false&nightlies=false&p=aix&pv=6.1&m=powerpc"
url http://opscode-omnibus-packages.s3.amazonaws.com/aix/6.1/powerpc/chef-12.0.3-1.powerpc.bff
md5 32391cc3cb1a4a4683109c55a0ee5641
sha256  166197c020a8765a4b7105ef185aa1867e4005856afacb9c4228e0aef5887a28
Member

btm commented Feb 10, 2015

Seth Chisamore 8:53 PM: @btm so up until now AIX releases are placed into prod Omnitruck by hand and don't exist in preprod. So your query works fine in prod:
➜  curl "http://www.chef.io/chef/metadata?v=&prerelease=false&nightlies=false&p=aix&pv=6.1&m=powerpc"
url http://opscode-omnibus-packages.s3.amazonaws.com/aix/6.1/powerpc/chef-12.0.3-1.powerpc.bff
md5 32391cc3cb1a4a4683109c55a0ee5641
sha256  166197c020a8765a4b7105ef185aa1867e4005856afacb9c4228e0aef5887a28
@btm

This comment has been minimized.

Show comment
Hide comment
@btm

btm Feb 10, 2015

Member

curl http://www-preprod.chef.io/chef/install.sh | sudo bash worked appropriately for me on an Ubuntu 13.10, OS X 10.9.4, and old Solaris 11 express systems I had kicking around.

Member

btm commented Feb 10, 2015

curl http://www-preprod.chef.io/chef/install.sh | sudo bash worked appropriately for me on an Ubuntu 13.10, OS X 10.9.4, and old Solaris 11 express systems I had kicking around.

@btm

This comment has been minimized.

Show comment
Hide comment
@btm

btm Feb 10, 2015

Member

Will release this to production during business hours tomorrow. Would appreciate any additional testing.

Member

btm commented Feb 10, 2015

Will release this to production during business hours tomorrow. Would appreciate any additional testing.

@chris-rock

This comment has been minimized.

Show comment
Hide comment
@chris-rock

chris-rock Feb 10, 2015

the script works on aix, but i could not test the download because binaries are not available at http://www-preprod.chef.io/chef/metadata?v=&prerelease=false&nightlies=false&p=aix&pv=7.1&m=powerpc

chris-rock commented Feb 10, 2015

the script works on aix, but i could not test the download because binaries are not available at http://www-preprod.chef.io/chef/metadata?v=&prerelease=false&nightlies=false&p=aix&pv=7.1&m=powerpc

@btm

This comment has been minimized.

Show comment
Hide comment
@btm

btm Feb 10, 2015

Member

yeah, apparently the builds are manually uploaded so they aren't in the preprod repositories. I just deployed to production and it looks like it is working:

/#curl http://www.chef.io/chef/install.sh | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 18353  100 18353    0     0  61539      0 --:--:-- --:--:-- --:--:-- 67474
Downloading Chef  for aix...
downloading http://www.chef.io/chef/metadata?v=&prerelease=false&nightlies=false&p=aix&pv=6.1&m=powerpc
  to file /tmp/install.sh.9633988/metadata.txt
trying wget...
url     http://opscode-omnibus-packages.s3.amazonaws.com/aix/6.1/powerpc/chef-12.0.3-1.powerpc.bff
md5     32391cc3cb1a4a4683109c55a0ee5641
sha256  166197c020a8765a4b7105ef185aa1867e4005856afacb9c4228e0aef5887a28
downloaded metadata file looks valid...
downloading http://opscode-omnibus-packages.s3.amazonaws.com/aix/6.1/powerpc/chef-12.0.3-1.powerpc.bff
  to file /tmp/install.sh.9633988/chef-12.0.3-1.powerpc.bff
trying wget...
Comparing checksum with md5sum...
Installing Chef
installing with installp...
+-----------------------------------------------------------------------------+
                    Pre-installation Verification...
+-----------------------------------------------------------------------------+
Verifying selections...done
Verifying requisites...done
Results...

SUCCESSES
---------
  Filesets listed in this section passed pre-installation verification
  and will be installed.

  Selected Filesets
  -----------------
  chef 12.0.3.1                               # The full stack of chef

  << End of Success Section >>

+-----------------------------------------------------------------------------+
                   BUILDDATE Verification ...
+-----------------------------------------------------------------------------+
Verifying build dates...done
FILESET STATISTICS
------------------
    1  Selected to be installed, of which:
        1  Passed pre-installation verification
  ----
    1  Total to be installed

+-----------------------------------------------------------------------------+
                         Installing Software...
+-----------------------------------------------------------------------------+

installp:  APPLYING software for:
        chef 12.0.3.1

Restoring files, please wait.
1006 files restored.
2096 files restored.
3175 files restored.
4053 files restored.
4859 files restored.
5939 files restored.
7056 files restored.
7931 files restored.
8869 files restored.
9992 files restored.
10938 files restored.
11729 files restored.
12809 files restored.
13895 files restored.
14716 files restored.
15502 files restored.
.... snip does this ever end? snip ...
Member

btm commented Feb 10, 2015

yeah, apparently the builds are manually uploaded so they aren't in the preprod repositories. I just deployed to production and it looks like it is working:

/#curl http://www.chef.io/chef/install.sh | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 18353  100 18353    0     0  61539      0 --:--:-- --:--:-- --:--:-- 67474
Downloading Chef  for aix...
downloading http://www.chef.io/chef/metadata?v=&prerelease=false&nightlies=false&p=aix&pv=6.1&m=powerpc
  to file /tmp/install.sh.9633988/metadata.txt
trying wget...
url     http://opscode-omnibus-packages.s3.amazonaws.com/aix/6.1/powerpc/chef-12.0.3-1.powerpc.bff
md5     32391cc3cb1a4a4683109c55a0ee5641
sha256  166197c020a8765a4b7105ef185aa1867e4005856afacb9c4228e0aef5887a28
downloaded metadata file looks valid...
downloading http://opscode-omnibus-packages.s3.amazonaws.com/aix/6.1/powerpc/chef-12.0.3-1.powerpc.bff
  to file /tmp/install.sh.9633988/chef-12.0.3-1.powerpc.bff
trying wget...
Comparing checksum with md5sum...
Installing Chef
installing with installp...
+-----------------------------------------------------------------------------+
                    Pre-installation Verification...
+-----------------------------------------------------------------------------+
Verifying selections...done
Verifying requisites...done
Results...

SUCCESSES
---------
  Filesets listed in this section passed pre-installation verification
  and will be installed.

  Selected Filesets
  -----------------
  chef 12.0.3.1                               # The full stack of chef

  << End of Success Section >>

+-----------------------------------------------------------------------------+
                   BUILDDATE Verification ...
+-----------------------------------------------------------------------------+
Verifying build dates...done
FILESET STATISTICS
------------------
    1  Selected to be installed, of which:
        1  Passed pre-installation verification
  ----
    1  Total to be installed

+-----------------------------------------------------------------------------+
                         Installing Software...
+-----------------------------------------------------------------------------+

installp:  APPLYING software for:
        chef 12.0.3.1

Restoring files, please wait.
1006 files restored.
2096 files restored.
3175 files restored.
4053 files restored.
4859 files restored.
5939 files restored.
7056 files restored.
7931 files restored.
8869 files restored.
9992 files restored.
10938 files restored.
11729 files restored.
12809 files restored.
13895 files restored.
14716 files restored.
15502 files restored.
.... snip does this ever end? snip ...
@lamont-granquist

This comment has been minimized.

Show comment
Hide comment
@lamont-granquist

lamont-granquist Feb 10, 2015

Contributor

@schisamo can you upload chef-12.0.3 AIX to preprod? As long as we have any version of chef client for AIX in preprod it'll enable testing.

Contributor

lamont-granquist commented Feb 10, 2015

@schisamo can you upload chef-12.0.3 AIX to preprod? As long as we have any version of chef client for AIX in preprod it'll enable testing.

@lamont-granquist

This comment has been minimized.

Show comment
Hide comment
@lamont-granquist

lamont-granquist Feb 10, 2015

Contributor

@btm there used to be an omnitruck-test CI job in old-ci which was used to test omnitruck itself against preprod without kicking off a prod deploy. it was identical to the preprod omnitruck test which happens as part of the release pipeline, but wasn't part of the release pipeline. if you want to better test omnitruck in preprod you could either figure out how to restore that job, or else just re-do the work to clone the existing job.

Contributor

lamont-granquist commented Feb 10, 2015

@btm there used to be an omnitruck-test CI job in old-ci which was used to test omnitruck itself against preprod without kicking off a prod deploy. it was identical to the preprod omnitruck test which happens as part of the release pipeline, but wasn't part of the release pipeline. if you want to better test omnitruck in preprod you could either figure out how to restore that job, or else just re-do the work to clone the existing job.

@btm

This comment has been minimized.

Show comment
Hide comment
@btm

btm Feb 10, 2015

Member

@lamont-granquist Thanks. I'm all done, this was a one-off expedited release request. Even if I had the time to work on this now, I think I'd want to wait until after old-CI is gone and talk to OCIV/QA about what to do instead now.

Member

btm commented Feb 10, 2015

@lamont-granquist Thanks. I'm all done, this was a one-off expedited release request. Even if I had the time to work on this now, I think I'd want to wait until after old-CI is gone and talk to OCIV/QA about what to do instead now.

@lamont-granquist

This comment has been minimized.

Show comment
Hide comment
@lamont-granquist

lamont-granquist Feb 10, 2015

Contributor

Cool, this should really get hooked into CD, it is standalone and would be easy to setup.

Contributor

lamont-granquist commented Feb 10, 2015

Cool, this should really get hooked into CD, it is standalone and would be easy to setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment