-
Notifications
You must be signed in to change notification settings - Fork 113
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
installdb.pp failing to unzip 18c source due to directory ownership/permission issue #257
Comments
This is indeed and issue. |
Hi, what is the issue here. I cannot and will not change the parent dirs because that will do more harm then it solves |
Hi,
Well, db_directory_structure is creating the parent directories (FileUtils.mkdir_p path), but changing ownership only for the full path.
This was not an issue prior to 18c since the oracle home path was being created by Oracle’s installer, not your module. You need to create it in 18c since you got to unzip the source image into it.
For me, easy workaround is to pre-create oracle_home structure before calling oradb module, so no biggie.
I just think either this module shouldn’t create the oracle home path, or if it does, it needs to be usable. The way it is being created, unzip will always fail.
Shammi DHALL
From: Edwin Biemond [mailto:[email protected]]
Sent: Monday, April 29, 2019 5:03 PM
To: biemond/biemond-oradb <[email protected]>
Cc: Shammi X Dhall <[email protected]>; State change <[email protected]>
Subject: EXTERNAL: Re: [biemond/biemond-oradb] installdb.pp failing to unzip 18c source due to directory ownership/permission issue (#257)
Hi, what is the issue here. I cannot and will not change the parent dirs because that will do more harm then it solves
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub<#257 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AL5WPX4JT7SQIXISIREVVKTPS5V7TANCNFSM4HI2JLXQ>.
…________________________________
****************************************************************** This message originated from the Internet. Its originator may or may not be who they claim to be and the information contained in the message and any attachments may or may not be accurate. ******************************************************************
-----------------------------------------
SAVE PAPER - THINK BEFORE YOU PRINT!
This E-mail is confidential.
It may also be legally privileged. If you are not the addressee you may not copy,
forward, disclose or use any part of it. If you have received this message in error,
please delete it and all copies from your system and notify the sender immediately by
return E-mail.
Internet communications cannot be guaranteed to be timely secure, error or virus-free.
The sender does not accept liability for any errors or omissions.
|
you don't need to create it yourself. it just works in https://github.com/biemond/biemond-oradb-vagrant-18.3-CDB-puppet4_3 and with grid https://github.com/biemond/biemond-oradb-vagrant-18.3-ASM-puppet4_3 so what does not work for you and take a look at these vagrant boxes thanks |
On a similar issue, if grid home and oracle home shares the same base directory oracle home is not getting created. Notice: /Stage[main]/Profile::Oracle::Server/Oradb::Installdb[dbsoftware]/Notify[oradb::installdb /u01/app/oracle/product/19.0.0/dbhome_1 does not exists]/message: defined 'message' as 'oradb::installdb /u01/app/oracle/product/19.0.0/dbhome_1 does not exists' -bash-4.2$ ls -tlr |
Even after using different path, db software install failed and puppet server log shows db_directory_structure.rb is creating grid home(/u01/app/grid/product/19.0.0/grid) again instead of oracle home (/u01/app/oracle/product/19.0.0/dbhome_1) Info: configure oracle folders for grid structure 19.0.0.0 |
The issue doesn't exist if oracle home path is pre-created. Otherwise, the path is getting created, but with root ownership for parent directories.
oracle base: /u01/app already exists.
path expected: /u01/app/oracle/product/18.0.0/db_home1
Path is getting created, but, oracle, product, & 18.0.0 directories are owned by root. The last one db_home1 is correctly owned by oracle:oinstall. Due to parent directories being 740, the unzip into the newly created path is failing.
The path is being created by this code in installdb.pp:
if ( $version in ['18.0.0.0']) {
# add oracle home for the unzip
db_directory_structure{"oracle structure ${version}_${title}":
ensure => present,
oracle_base_dir => $oracle_base,
oracle_home_dir => $oracle_home,
ora_inventory_dir => $ora_inventory,
download_dir => $resp_file_dir,
os_user => $user,
os_group => $group_install,
}
Likely culprit is db_directory_structure.rb:
unless oracle_home.nil?
make_directory oracle_home
owned_by_oracle oracle_home, user, group
end
end
def make_directory(path)
Puppet.info "creating directory #{path}"
FileUtils.mkdir_p path
end
def owned_by_oracle(path, user, group)
Puppet.info "Setting oracle ownership for #{path} with 0775"
FileUtils.chmod 0775, path
FileUtils.chown user, group, path
end
I couldn't find details on FileUtils.chown, but it appears it is only changing ownership of the full path /u01/app/oracle/product/18.0.0./db_home1 and leaves the parent directories at their original root ownership.
This was not an issue prior to 18c since oracle_home creation wasn't part of db_directory_structure then.
The text was updated successfully, but these errors were encountered: