Skip to content
This repository has been archived by the owner on Feb 28, 2020. It is now read-only.

wls_opatch on windows causes warnings regarding path being too long (truncation) #26

Open
mrswadge opened this issue Sep 19, 2018 · 2 comments

Comments

@mrswadge
Copy link

The patches for weblogic on windows tend to have very long file paths when they are extracted. This is an issue when running opatch. The process ends with exit code 50.

... snipped ...
sbschef.local                     -> D:/OT/tmp_dir/12c/27342434/files/oracle.wls.security.core.sharedlib/12.2.1.3.0/wls.common.symbol/lib/schematypes/OracleIdentityCloudIntegratorProviders.schema.jar/schemaorg_apache_xmlbeans/system/OracleIdentityCloudIntegrator/oracleidentitycloudintegratortype
sbschef.local     checkdir warning:  path too long; truncating
sbschef.local                        27342434/files/oracle.wls.security.core.sharedlib/12.2.1.3.0/wls.common.symbol/lib/schematypes/OracleIdentityCloudIntegratorProviders.schema.jar/schemaorg_apache_xmlbeans/system/OracleIdentityCloudIntegrator/oracleidentitycloudintegratortype3bfdtype.xsb
sbschef.local
sbschef.local                     -> D:/OT/tmp_dir/12c/27342434/files/oracle.wls.security.core.sharedlib/12.2.1.3.0/wls.common.symbol/lib/schematypes/OracleIdentityCloudIntegratorProviders.schema.jar/schemaorg_apache_xmlbeans/system/OracleIdentityCloudIntegrator/oracleidentitycloudintegratortype
sbschef.local     checkdir warning:  path too long; truncating
sbschef.local                        27342434/files/oracle.wls.security.core.sharedlib/12.2.1.3.0/wls.common.symbol/lib/schematypes/OracleIdentityCloudIntegratorProviders.schema.jar/schemaorg_apache_xmlbeans/system/OracleIdentityCloudIntegrator/oracleidentitycloudintegratortype3bfdtype.xsb
sbschef.local                     -> D:/OT/tmp_dir/12c/27342434/files/oracle.wls.security.core.sharedlib/12.2.1.3.0/wls.common.symbol/lib/schematypes/OracleIdentityCloudIntegratorProviders.schema.jar/schemaorg_apache_xmlbeans/system/OracleIdentityCloudIntegrator/oracleidentitycloudintegratortype
sbschef.local     checkdir warning:  path too long; truncating
sbschef.local                        27342434/files/oracle.wls.security.core.sharedlib/12.2.1.3.0/wls.common.symbol/lib/schematypes/OracleIdentityCloudIntegratorProviders.schema.jar/schemaorg_apache_xmlbeans/system/OracleIdentityCloudIntegrator/oracleidentitycloudintegratortype3bfdtype.xsb
sbschef.local                     -> D:/OT/tmp_dir/12c/27342434/files/oracle.wls.security.core.sharedlib/12.2.1.3.0/wls.common.symbol/lib/schematypes/OracleIdentityCloudIntegratorProviders.schema.jar/schemaorg_apache_xmlbeans/system/OracleIdentityCloudIntegrator/oracleidentitycloudintegratortype
sbschef.local     error:  cannot create D:/OT/tmp_dir/12c/27342434/files/oracle.wls.security.core.sharedlib/12.2.1.3.0/wls.common.symbol/lib/schematypes/OracleIdentityCloudIntegratorProviders.schema.jar/schemaorg_apache_xmlbeans/system/OracleIdentityCloudIntegrator/oracleidentitycloudintegratortype3bfdtype.xsb
sbschef.local     ---- End output of D:/OT/WebLogic/12c\oracle_common\adr\unzip.exe -o c:/chef/cache/cookbooks/otbo_weblogic/files/default/p27342434_122130_Generic.zip -d D:/OT/tmp_dir/12c ----
sbschef.local     Ran D:/OT/WebLogic/12c\oracle_common\adr\unzip.exe -o c:/chef/cache/cookbooks/otbo_weblogic/files/default/p27342434_122130_Generic.zip -d D:/OT/tmp_dir/12c returned 50
sbschef.local
sbschef.local     Resource Declaration:
sbschef.local     ---------------------
sbschef.local     # In c:/chef/cache/cookbooks/fmw_opatch/recipes/weblogic.rb
sbschef.local
sbschef.local      22: fmw_opatch_fmw_extract node['fmw_opatch']['weblogic_patch_id'] do
sbschef.local      23:   action              :extract
sbschef.local      24:   source_file         node['fmw_opatch']['weblogic_source_file']
sbschef.local      25:   os_user             node['fmw']['os_user']             if ['solaris2', 'linux'].include?(node['os'])
sbschef.local      26:   os_group            node['fmw']['os_group']            if ['solaris2', 'linux'].include?(node['os'])
sbschef.local      27:   tmp_dir             node['fmw']['tmp_dir']
sbschef.local      28:   middleware_home_dir node['fmw']['middleware_home_dir'] if node['os'].include?('windows')
sbschef.local      29:   version             node['fmw']['version']             if node['os'].include?('windows')
sbschef.local      30: end
sbschef.local      31:
sbschef.local
sbschef.local     Compiled Resource:
sbschef.local     ------------------
sbschef.local     # Declared in c:/chef/cache/cookbooks/fmw_opatch/recipes/weblogic.rb:22:in `from_file'
sbschef.local
sbschef.local     fmw_opatch_fmw_extract_windows("27342434") do
sbschef.local       action [:extract]
sbschef.local       updated true
sbschef.local       updated_by_last_action true
sbschef.local       default_guard_interpreter :default
sbschef.local       declared_type :fmw_opatch_fmw_extract
sbschef.local       cookbook_name "fmw_opatch"
sbschef.local       recipe_name "weblogic"
sbschef.local       source_file "c:/chef/cache/cookbooks/otbo_weblogic/files/default/p27342434_122130_Generic.zip"
sbschef.local       tmp_dir "D:/OT/tmp_dir/12c"
sbschef.local       middleware_home_dir "D:/OT/WebLogic/12c"
sbschef.local       version "12.2.1.3"
sbschef.local     end
sbschef.local
sbschef.local     System Info:
sbschef.local     ------------
sbschef.local     chef_version=14.4.56
sbschef.local     platform=windows
sbschef.local     platform_version=10.0.14393
sbschef.local     ruby=ruby 2.5.1p57 (2018-03-29 revision 63029) [x64-mingw32]
sbschef.local     program_name=C:/opscode/chef/bin/chef-client
sbschef.local
sbschef.local executable=C:/opscode/chef/bin/chef-client
sbschef.local
sbschef.local [2018-09-19T16:41:55+01:00] INFO: Running queued delayed notifications before re-raising exception
sbschef.local
sbschef.local Running handlers:
sbschef.local [2018-09-19T16:41:55+01:00] ERROR: Running exception handlers
sbschef.local Running handlers complete
sbschef.local [2018-09-19T16:41:55+01:00] ERROR: Exception handlers complete
sbschef.local Chef Client failed. 3 resources updated in 16 seconds
sbschef.local [2018-09-19T16:41:55+01:00] FATAL: SystemCallError: The parameter is incorrect. - ReportEvent
ERROR: Failed to execute command on sbschef.local return code 1

We can change our tmp_dir to D:\ here, but on customer environments we may not have permission to do so. The extract needs to be long path name aware.

Cheers,
Stuart

@mrswadge
Copy link
Author

It's actually failing with the smallest possible path, so actually this issue is worse than I originally reported. I cannot shorten this path anymore.

sbschef.local       inflating: D:/27342434/files/inventory/Components/oracle.wls.core.app.server/12.2.1.3.0/patches/21933966/compDef.xml
sbschef.local       inflating: D:/27342434/README.txt
sbschef.local       inflating: D:/27342434/README.html
sbschef.local     STDERR: checkdir warning:  path too long; truncating
sbschef.local                        27342434/files/oracle.wls.security.core.sharedlib/12.2.1.3.0/wls.common.symbol/lib/schematypes/OracleIdentityCloudIntegratorProviders.schema.jar/com/oracle/xmlns/weblogic/security/idcs/impl/OracleIdentityCloudIntegratorTypeImpl$TokenValidationLevelImpl.class
sbschef.local                     -> D:/27342434/files/oracle.wls.security.core.sharedlib/12.2.1.3.0/wls.common.symbol/lib/schematypes/OracleIdentityCloudIntegratorProviders.schema.jar/com/oracle/xmlns/weblogic/security/idcs/impl/OracleIdentityCloudIntegratorTypeImpl$TokenValidationLevelImpl.cla
sbschef.local     checkdir warning:  path too long; truncating
sbschef.local                        27342434/files/oracle.wls.security.core.sharedlib/12.2.1.3.0/wls.common.symbol/lib/schematypes/OracleIdentityCloudIntegratorProviders.schema.jar/com/oracle/xmlns/weblogic/security/idcs/impl/OracleIdentityCloudIntegratorTypeImpl$TokenValidationLevelImpl.class
sbschef.local                     -> D:/27342434/files/oracle.wls.security.core.sharedlib/12.2.1.3.0/wls.common.symbol/lib/schematypes/OracleIdentityCloudIntegratorProviders.schema.jar/com/oracle/xmlns/weblogic/security/idcs/impl/OracleIdentityCloudIntegratorTypeImpl$TokenValidationLevelImpl.cla
sbschef.local
sbschef.local     error:  cannot create D:/27342434/files/oracle.wls.security.core.sharedlib/12.2.1.3.0/wls.common.symbol/lib/schematypes/OracleIdentityCloudIntegratorProviders.schema.jar/com/oracle/xmlns/weblogic/security/idcs/impl/OracleIdentityCloudIntegratorTypeImpl$TokenValidationLevelImpl.class
sbschef.local     ---- End output of D:/OT/WebLogic/12c\oracle_common\adr\unzip.exe -o c:/chef/cache/cookbooks/otbo_weblogic/files/default/p27342434_122130_Generic.zip -d D:/ ----
sbschef.local     Ran D:/OT/WebLogic/12c\oracle_common\adr\unzip.exe -o c:/chef/cache/cookbooks/otbo_weblogic/files/default/p27342434_122130_Generic.zip -d D:/ returned 50

@mrswadge
Copy link
Author

I have opened a pull request to fix this using jar xvf to extract the patch.
#27

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant