ZOSOpenTools / meta

Meta repository to tie together the various underlying z/OS Open Source tools (ZOT) repositories here
https://zosopentools.github.io/meta/
Apache License 2.0
38 stars 27 forks source link

zopen upgrade fails when not run from zopen root dir #513

Open dknibb opened 11 months ago

dknibb commented 11 months ago

zopen upgrade fails when not run from zopen root dir

/u/davikni:>zopen init --re-init --verbose
Initialize zopen framework
- Enter fully-qualified path to your zopen root directory (default: /u/davikni/zopen):
/cvm/zopen
- Binaries will be symlinked under "/cvm/zopen/usr/local/bin". Libraries will be symlinked under "/cvm/zopen/usr/lib"
- Packages will be installed and maintained under the directory structure usrlclz (/cvm/zopen/usr/local/zopen). To change, re-run with the -f <layout> option.
Do you want to continue? [y/n]
y
- Re-initializing; removing existing zopen-config
Checking for existence of specified root: '/cvm/zopen'
- Populating standard file system
- Creating path for bootstrap files
- Creating symbolic path for prod redirect files
- Creating path for certificate lookups
- Created config in /cvm/zopen/etc/zopen-config
- Root FS available at /cvm/zopen
- Configured zopen to use stable releaseline packages
- Check for shipped curl pax
/cvm/zopen/usr/local/packages/curl-8.1.2.20230707_145137.zos.pax.Z
- Found packages/curl-8.1.2.20230707_145137.zos.pax.Z. Adding to zopen cache to install as bootstrap
VERBOSE: '- Expanding curl to bootstrap dir...'
- Check for shipped jq pax
- Found packages/jq-1.6.20230720_160648.zos.pax.Z. Adding to zopen cache to install as bootstrap
VERBOSE: '- Expanding jq to bootstrap dir...'
VERBOSE: 'Configuring CA certificate file 'cacert.pem''
VERBOSE: 'Check for existing ZOPEN_CA environment variable: etc/pki/tls/certs/cacert.pem'
VERBOSE: 'Existing envvar for ZOPEN_CA found'
VERBOSE: 'Unable to use Certificate file 'cacert.pem' specified in environment variable ZOPEN_CA='etc/pki/tls/certs/cacert.pem'. '
VERBOSE: 'Checking '/cvm/zopen/usr/local/bin' directory tree for certificate file 'cacert.pem''
VERBOSE: 'Could not locate certificate file in directory structure'
VERBOSE: 'Attempting relative search for certificate file at '/cvm/zopen/usr/local/bin/../../etc/pki/tls/certs/cacert.pem''
VERBOSE: 'Relative search did not locate certificate file'
***ERROR: Could not find 'cacert.pem' to copy to new environment. Re-run 'zopen init' with the '--verbose' option for more details

Analysis from Russell Wilson:

hmm.. it should be possible to run from anywhere. Looking at your log, when we set ZOPEN_CA, we seem to have not incorporated the rootfs with that envvar and also when we moved from usr to usr/local for zopen to create the symlink structure, that relative path search has broken (double-whammy!) :-( can you raise an issue so we can track this plz? As a workaround, I think issuing an export ZOPEN_CA=/cvm/zopen/etc/pki/tls/certs/cacert.pem should get you going (assuming you haven't moved past that already!)

MikeFultonDev commented 10 months ago

@dknibb was the 'zopen init' an init after a previous init (i am assuming so since you have --re-init but never hurts to check)? When you did the first 'zopen init', was it also to /cvm/zopen ?

MikeFultonDev commented 10 months ago

Unable to reproduce. @dknibb if you are able to provide more details, please re-open with the info requested.

dknibb commented 10 months ago

Sorry @MikeFultonDev missed your prior update. Installation was following instructions at https://zosopentools.github.io/meta/#/Guides/QuickStart and yes was done to /cvm/zopen in the original instance.