-
Notifications
You must be signed in to change notification settings - Fork 74
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
Impossible to mount as tmpfs by default #202
Comments
Hey @stronk7, Thanks a lot for this information, however, I cannot make out what change solved the permission issues with |
Hi @gvenzl, so far, the only relaed change in that commit (that applies other, unrelated) was the linked line: + RUN chmod 777 -R /opt/oracle/oradata With that, the tmpfs mount worked and the install/unzip doesn't fail with permissions errors. BTW, we have applied exactly the same The rest of changes are unrelated, Moodle-specific or the disabling of async IO, that we are applying since 11g. Ciao :-) |
Hey @stronk7, Ah I see, thanks a lot! Thanks a lot! |
Just for the records, yesterday I went to rebuild our images (they were ~4 months old, from whenever I created this issue), and the new images are failing on startup with error:
And I've checked that disabling our attempt to mount with tmpfs shared in the issue description:
Is what causes it (the container starts perfectly without it). I've not had a chance to look to the changes since 4 months ago (they aren't many), will share here if I find something. Just wanted to warn in advance, that the proposed change of permissions is, now, not allowing the tmpfs mount to succeed. Ciao :-) |
Just to confirm that it seems that mounting on tmpfs stopped working for us with #207 (was working before it). So, maybe, there is some operation that the:
command is trying to perform, and cannot in a tmpfs mounted system... will try to debug it locally, I don't know much about 7z... Ciao :-) |
Ok, so the problem seems to be that we are mounting via tmpfs the I've tried here mounting via tmpfs the whole It would be awesome if the 7z command has some flag to continue on existing directories... So, TLDR:
I'll check if there is any way to allow the 7z command to continue on existing directories... Mystery solved, ciao :-) Edited: I've been unable to find any switch of 7z able to disable the (timemodified or whatever) attributes updating that is causing the problem with the, root's owned, oradata/XE mount point... so only solution is, our side, to mount the whole oradata directory instead (too much, IMO, but our current CI infrastructure should support that without problem). |
While historically it has been enough to just mount the XE/XEPDB1 directories for tmpfs, recent changes in the upstream images (switching from unzip to 7zzs) are causing some problems with the later failing because it's not able to set attributes on the mounted directory. To workaround that (haven't been able to find any switch in 7zzs able to allow it to continue on attribute/timemodified changes, we are going to mount with tmpfs the whole oradata directory. It will require (safeguard) some more memory (+2Gb) but that shouldn't be a problem as far as we have enough memory in the workers and also, have Oracle concurrent builds restricted to be max 1 by worker. For a little more information about the issue and what caused it: gvenzl/oci-oracle-xe#202
While historically it has been enough to just mount the XE/XEPDB1 directories for tmpfs, recent changes in the upstream images (switching from unzip to 7zzs) are causing some problems with the later failing because it's not able to set attributes on the mounted directory. To workaround that (haven't been able to find any switch in 7zzs able to allow it to continue on attribute/timemodified changes), we are going to mount with the whole oradata directory instead. It will require (safeguard) some more memory (+2Gb) but that shouldn't be a problem as far as we have enough memory in the workers and also, have Oracle concurrent builds restricted to be max 1 by worker. For a little more information about the issue and what caused it: gvenzl/oci-oracle-xe#202
Hey @stronk7, Thanks a lot for this comprehensive and most welcome detailed analysis! I'll add the permission changes to the images so that you won't have to do that anymore. However, thinking about this a bit more, mounting sub-directories only without the corresponding |
Thanks @gvenzl, yeah, I can imagine that mounting only xe/free or other portable sub-directories is not ideal, in this case the main point of this is to get some speed benefit on tests, hence they are 100% disposable. And, yes, curious that 7z fails with that, I was looking for available options to see if there was anything available about skipping existing directories or ignore perms failures... but didn't find anything. In any case, right now we are tmpfs mounting the whole oradata, and it's working ok (luckily we have enough RAM in our CI workers to do that without too much trouble). Again, thanks. Ciao :-) |
Hey @stronk7, Great, that's great to hear! The new version of the images with the changes should go live later today. Btw, if you like, I'd be more than happy to highlight your project(s) on https://github.com/gvenzl/oci-oracle-xe#users-of-these-images, if not done so already. And btw, btw, you may want to, or already have considered, upgrading to |
Signed-off-by: gvenzl <[email protected]>
Ah, we already have a 23c image based on your Ciao :-) |
That's great, thanks for letting me know, and glad to hear that it works just fine as well! Unless there is anything else, are you OK with closing this issue as completed? |
Completed, thanks! |
* Update jOOQ reference and 'sqlplus' Signed-off-by: gvenzl <[email protected]> * Fix #202, $ORACLE_BASE/oradata permissions Signed-off-by: gvenzl <[email protected]> * Provide user warning of old images Signed-off-by: gvenzl <[email protected]> --------- Signed-off-by: gvenzl <[email protected]>
* Update tests and retries Signed-off-by: gvenzl <[email protected]> * Update all references to REGULAR images Signed-off-by: gvenzl <[email protected]> * Clean zip files in lib dir Signed-off-by: gvenzl <[email protected]> * Remove not needed deps from fortran runtime Signed-off-by: gvenzl <[email protected]> * Remove inventory directory Signed-off-by: gvenzl <[email protected]> * Move zip file to ORACLE_BASE for host-only vols Signed-off-by: gvenzl <[email protected]> * Use SHRINK SPACE for TEMP files Signed-off-by: gvenzl <[email protected]> * Exit SQL*Plus on SQL errors Signed-off-by: gvenzl <[email protected]> * Add tag and upload scripts Signed-off-by: gvenzl <[email protected]> * Remove XDB Signed-off-by: gvenzl <[email protected]> * Remove Oracle Text Signed-off-by: gvenzl <[email protected]> * Remove Spatial Signed-off-by: gvenzl <[email protected]> * Escape $ signs Signed-off-by: gvenzl <[email protected]> * Fix rm ctx typo Signed-off-by: gvenzl <[email protected]> * Create new TEMP tablespace for SEED Signed-off-by: gvenzl <[email protected]> * Shrink UNDO tablespaces Signed-off-by: gvenzl <[email protected]> * Intro Artifactory uploads Signed-off-by: gvenzl <[email protected]> * Add fully qualified tags Signed-off-by: gvenzl <[email protected]> * Update ReadMe Signed-off-by: gvenzl <[email protected]> * Undo retention no longer required Signed-off-by: gvenzl <[email protected]> * Further reduce 11g slim image Signed-off-by: gvenzl <[email protected]> * No longer needed due to new UNDO tablespace creation Signed-off-by: gvenzl <[email protected]> * Remove OJVM and Java Packages + Multimedia and XDK dependencies Signed-off-by: gvenzl <[email protected]> * Update ReadMe Signed-off-by: gvenzl <[email protected]> * Introduce tests for ORACLE_PASSWORD and ORACLE_RANDOM_PASSWORD Signed-off-by: gvenzl <[email protected]> * ER #16: provide APP user variables Signed-off-by: gvenzl <[email protected]> * Add Ora pwd, random pwd and app user/pwd tests Signed-off-by: gvenzl <[email protected]> * Remove workspace manager Signed-off-by: gvenzl <[email protected]> * Remove OLAP Signed-off-by: gvenzl <[email protected]> * Update package dependencies removal Signed-off-by: gvenzl <[email protected]> * Make removal messages consistent Signed-off-by: gvenzl <[email protected]> * Fix Java Packages removal Signed-off-by: gvenzl <[email protected]> * ER #22: provide GitHub Actions snippet Signed-off-by: gvenzl <[email protected]> * Remove Java Package leftovers Signed-off-by: gvenzl <[email protected]> * Do not remove SLAX, used for PL/SQL Signed-off-by: gvenzl <[email protected]> * Remove Oracle Text, produce SLIM image Signed-off-by: gvenzl <[email protected]> * Update dep removal Signed-off-by: gvenzl <[email protected]> * Add 18c slim tests Signed-off-by: gvenzl <[email protected]> * Do not remove LDAP folder Signed-off-by: gvenzl <[email protected]> * Update test descriptions Signed-off-by: gvenzl <[email protected]> * SQLPlus: fail on error Signed-off-by: gvenzl <[email protected]> * Remove OJVMSYS leftover Signed-off-by: gvenzl <[email protected]> * ER #23: Support ORACLE_DATABASE Signed-off-by: gvenzl <[email protected]> * Add checkpoint after UNDO switch Signed-off-by: gvenzl <[email protected]> * Remove GPX, standalone, can be downloaded Signed-off-by: gvenzl <[email protected]> * Update container test run script Signed-off-by: gvenzl <[email protected]> * Update ReadMe for OARCLE_DATABASE 18c only Signed-off-by: gvenzl <[email protected]> * Update ReadMe with SLIM image Signed-off-by: gvenzl <[email protected]> * Add slim images to upload scripts Signed-off-by: gvenzl <[email protected]> * Remove Spatial Signed-off-by: gvenzl <[email protected]> * Remove Oracle R Signed-off-by: gvenzl <[email protected]> * Remove Cluster Ready Services (crs) Signed-off-by: gvenzl <[email protected]> * Remove Clsuter Verification Utility Signed-off-by: gvenzl <[email protected]> * Remove deinstall directory Signed-off-by: gvenzl <[email protected]> * Remove Oracle Database Provider for Distributed Relational Database Architecture (DRDA) Signed-off-by: gvenzl <[email protected]> * Remove install directory Signed-off-by: gvenzl <[email protected]> * Update ReadMe Signed-off-by: gvenzl <[email protected]> * Remove 'ord' and 'ordim' directories Signed-off-by: gvenzl <[email protected]> * Remove Universal Installer Signed-off-by: gvenzl <[email protected]> * Remove additional components Signed-off-by: gvenzl <[email protected]> * update option flag for build script Signed-off-by: gvenzl <[email protected]> * Fix typo in sqlnet.ora Signed-off-by: gvenzl <[email protected]> * disable netca Signed-off-by: gvenzl <[email protected]> * Register new PDB with Listener Signed-off-by: gvenzl <[email protected]> * set shared servers to 0 Signed-off-by: gvenzl <[email protected]> * Fix cleanup for non-localhost bulid containers Signed-off-by: gvenzl <[email protected]> * Remove unnecessary bianries and libraries Signed-off-by: gvenzl <[email protected]> * Doc: Remove unnecessary bianries and libraries Signed-off-by: gvenzl <[email protected]> * Add backup for old images Signed-off-by: gvenzl <[email protected]> * use fully qualified image urls Signed-off-by: gvenzl <[email protected]> * invoke backup of old images by default Signed-off-by: gvenzl <[email protected]> * Add users to ReadMe Signed-off-by: gvenzl <[email protected]> * List RPM package removal alphabetically Signed-off-by: gvenzl <[email protected]> * List RPM package removal alphabetically Signed-off-by: gvenzl <[email protected]> * Gracefully stop listener (now that listener is started manually) Signed-off-by: gvenzl <[email protected]> * Fix typo in RPM package removal Signed-off-by: gvenzl <[email protected]> * Introducing 21c-full Signed-off-by: gvenzl <[email protected]> * Fixing minor Doc bug Signed-off-by: gvenzl <[email protected]> * Add image users Signed-off-by: gvenzl <[email protected]> * Add 21c supported tags Signed-off-by: gvenzl <[email protected]> * Explain persistent containers Signed-off-by: gvenzl <[email protected]> * Update 18c to '18c and onwards' Signed-off-by: gvenzl <[email protected]> * Add cleanup to 21c images Signed-off-by: gvenzl <[email protected]> * Add jOOQ as image user Signed-off-by: gvenzl <[email protected]> * Introducing 21c regular Signed-off-by: gvenzl <[email protected]> * Fix static ora* location scripts Signed-off-by: gvenzl <[email protected]> * Add 21c images for upload Signed-off-by: gvenzl <[email protected]> * Update Readme with 21c tags Signed-off-by: gvenzl <[email protected]> * Add artifactory upload Signed-off-by: gvenzl <[email protected]> * Adding Container Example Start/Creation Script * Incorporated feedback and fixes from pull request in example script * Fix for #43 Signed-off-by: gvenzl <[email protected]> * Remove Oracle Memory Speed (OMS) PMEM binaries Signed-off-by: gvenzl <[email protected]> * Remove MLE Signed-off-by: gvenzl <[email protected]> * Added PWgen check * Clean lastlog Signed-off-by: gvenzl <[email protected]> * Add 21c backups Signed-off-by: gvenzl <[email protected]> * Fix typo for 21 tests Signed-off-by: gvenzl <[email protected]> * Fix for #50, set exec permissions for shell scripts Signed-off-by: gvenzl <[email protected]> * Add utPLSQL as users Signed-off-by: gvenzl <[email protected]> * Better GitHub Actions documentation as per #45 Signed-off-by: gvenzl <[email protected]> * Document Upscheme user (#56) Signed-off-by: gvenzl <[email protected]> * Update RPM package uninstall for new OL image Signed-off-by: gvenzl <[email protected]> * Introducing 21c-slim Signed-off-by: gvenzl <[email protected]> * Remove ore.so in 18c Signed-off-by: gvenzl <[email protected]> * Move REDO resize to other resize operations to avoid 'checkpoint incomplete' during setup Signed-off-by: gvenzl <[email protected]> * Resize REDO logs at end to avoid 'checkpoint incomplete' during setup Signed-off-by: gvenzl <[email protected]> * Add Sqitch to users as per #46 Signed-off-by: gvenzl <[email protected]> * 21-slim GA ready Signed-off-by: gvenzl <[email protected]> * Put Docker.io login as first step Signed-off-by: gvenzl <[email protected]> * Remove Examples folder from main ReadMe Signed-off-by: gvenzl <[email protected]> * Assign variable values before input check Signed-off-by: gvenzl <[email protected]> * Fix example script 'pwgen' check Signed-off-by: gvenzl <[email protected]> * Introduce fix for #64 (Increase SGA_TARGET on high CPU count) Signed-off-by: gvenzl <[email protected]> * Remove Replay Upgrade feature Signed-off-by: gvenzl <[email protected]> * Clean up METASTYLESHEET LOBs Signed-off-by: gvenzl <[email protected]> * Rebuild pdbsync indexes Signed-off-by: gvenzl <[email protected]> * Clean up fed blocks Signed-off-by: gvenzl <[email protected]> * Shrink CDB SYSTEM tablespace datafile Signed-off-by: gvenzl <[email protected]> * List Ruby packages users (#66) Signed-off-by: gvenzl <[email protected]> * Shrink 21c CDB TEMP datafile Signed-off-by: gvenzl <[email protected]> * Shrink 18c TEMP datafile Signed-off-by: gvenzl <[email protected]> * Remove OLAP library Signed-off-by: gvenzl <[email protected]> * Do not increase SGA_TARGET for 11g (fixes #71) (#72) Oracle Database 11g XE is restricted to use no more than 1 GB of memory. The fix for #64 sets the memory to 1.5 GB, so that the database fails to start with the error: ORA-47500: XE edition memory parameter invalid or not specified * Update note for #72 Signed-off-by: gvenzl <[email protected]> * ER #60: introduce container minimum memory check Signed-off-by: gvenzl <[email protected]> * ER #61: introduce container minimum memory check Signed-off-by: gvenzl <[email protected]> * Update utPLSQL references as per #77 Signed-off-by: gvenzl <[email protected]> * Provide TDE setup script example as per #70 Signed-off-by: gvenzl <[email protected]> * More solid fix for #64 Signed-off-by: gvenzl <[email protected]> * Enhance documentation for secrets (#69) Signed-off-by: gvenzl <[email protected]> * Document HitHub Action container label usage (#81) Signed-off-by: gvenzl <[email protected]> * Fix doc bug for APP_USER Signed-off-by: gvenzl <[email protected]> * Add CREATE SYNONYM permission to APP_USER. (#94) * Externalise script createAppUser (#103) Closes #102 * Modularize app user creation Signed-off-by: gvenzl <[email protected]> * Update image users Signed-off-by: gvenzl <[email protected]> * Fix typo Signed-off-by: gvenzl <[email protected]> * Fix #104 Signed-off-by: gvenzl <[email protected]> * Inlcude pam package for OS based auth (#57) Signed-off-by: gvenzl <[email protected]> * Generic fix for #64 Signed-off-by: gvenzl <[email protected]> * Include 21-slim in backups Signed-off-by: gvenzl <[email protected]> * Pre-create container init folders (#108) Signed-off-by: gvenzl <[email protected]> * Enable Diag and Tuning packs (and EM Express) #112 Signed-off-by: gvenzl <[email protected]> * Disable audit log Signed-off-by: gvenzl <[email protected]> * Update ImageDetails.md Signed-off-by: gvenzl <[email protected]> * Fix for #109 Signed-off-by: gvenzl <[email protected]> * Reorder references Signed-off-by: gvenzl <[email protected]> * Update references Signed-off-by: gvenzl <[email protected]> * Document Apple M chips (#63) Signed-off-by: gvenzl <[email protected]> * Implemented --nowait (#119) Signed-off-by: gvenzl <[email protected]> * Fix missing link for colima install Signed-off-by: gvenzl <[email protected]> * Introduce faststart images ER #36 Signed-off-by: gvenzl <[email protected]> * Introduce faststart images (ER #36) Signed-off-by: gvenzl <[email protected]> * Provide images on GHCR (ER #131) Signed-off-by: gvenzl <[email protected]> * fix #144 Signed-off-by: gvenzl <[email protected]> * Include -faststart images in backup Signed-off-by: gvenzl <[email protected]> * Document recursive init scripts, make output a bit more readable Signed-off-by: gvenzl <[email protected]> * Fix #142, use default memory for BUILDKIT Signed-off-by: gvenzl <[email protected]> * #157: Futher specify faststart image use not being for persistency Signed-off-by: gvenzl <[email protected]> * Fix typo #168 Signed-off-by: gvenzl <[email protected]> * #171 Allow mounting external volume for oradata subfolders (#172) Signed-off-by: Loïc LEFEVRE <[email protected]> * Fix #171: do not delete directory structure Signed-off-by: gvenzl <[email protected]> * Make init script against XE more prominent in README Signed-off-by: gvenzl <[email protected]> * Add 'find' utility for 11.2 build Signed-off-by: gvenzl <[email protected]> * Add details for enabling In-Memory Columnar processing on XE #188 (#189) * 21c multiple layers Signed-off-by: gvenzl <[email protected]> * multiple layers faststart Signed-off-by: gvenzl <[email protected]> * Multiple layers 18c Signed-off-by: gvenzl <[email protected]> * Update faststart for 11g Signed-off-by: gvenzl <[email protected]> * harmonize Dockerfiles Signed-off-by: gvenzl <[email protected]> * multi-layer 11g Signed-off-by: gvenzl <[email protected]> * Use user- / group name for chown Signed-off-by: gvenzl <[email protected]> * Document -x buildContainerImage.sh parameter Signed-off-by: gvenzl <[email protected]> * use env vars instead of literal Signed-off-by: gvenzl <[email protected]> * Remove unnecessary timezone files Signed-off-by: gvenzl <[email protected]> * Remove unecessary binaries Signed-off-by: gvenzl <[email protected]> * Update ImageDetails with timezone files Signed-off-by: gvenzl <[email protected]> * Cleanup comments Signed-off-by: gvenzl <[email protected]> * Remove old timezone info 18c Signed-off-by: gvenzl <[email protected]> * Further remove binaries in 18c Signed-off-by: gvenzl <[email protected]> * Use 7z for data files uncompress Signed-off-by: gvenzl <[email protected]> * Don't shasum faststart image build Signed-off-by: gvenzl <[email protected]> * Run ORACLE_DATABASE case insensitive tests Signed-off-by: gvenzl <[email protected]> * Use docker.io login Signed-off-by: gvenzl <[email protected]> * Update Quarkus Reference Signed-off-by: gvenzl <[email protected]> * Migrate Benthos Signed-off-by: gvenzl <[email protected]> * Migrate Hibernate Reactive Signed-off-by: gvenzl <[email protected]> * Healthcheck PDB status for 18c+ Signed-off-by: gvenzl <[email protected]> * Update resetPassword param documentation Signed-off-by: gvenzl <[email protected]> * Update Spring Data reference Signed-off-by: gvenzl <[email protected]> * Update .bash_profile variables Signed-off-by: gvenzl <[email protected]> * Backport healthcheck from Free images (#215) Signed-off-by: gvenzl <[email protected]> * Use XEPDB1 as default Signed-off-by: gvenzl <[email protected]> * Update jOOQ reference and 'sqlplus' Signed-off-by: gvenzl <[email protected]> * Fix #202, /oradata permissions Signed-off-by: gvenzl <[email protected]> * Provide user warning of old images Signed-off-by: gvenzl <[email protected]> * Update Ruby on Rails ActiveRecord user Signed-off-by: gvenzl <[email protected]> * Provide FREE,FREEPDB1 service names (ER #238) Signed-off-by: Gerald Venzl <[email protected]> * Update readme Signed-off-by: Gerald Venzl <[email protected]> * Update labels Signed-off-by: Gerald Venzl <[email protected]> * Fix for #57 Signed-off-by: Gerald Venzl <[email protected]> * Upgrade 7zip Signed-off-by: Gerald Venzl <[email protected]> * Update ReadMe and docker startup script Signed-off-by: Gerald Venzl <[email protected]> --------- Signed-off-by: gvenzl <[email protected]> Signed-off-by: Loïc LEFEVRE <[email protected]> Signed-off-by: Gerald Venzl <[email protected]> Co-authored-by: Daniel Haanpaa [Lab0] <[email protected]> Co-authored-by: cedric-v3 <[email protected]> Co-authored-by: Simon Potter <[email protected]> Co-authored-by: Neil Crow <[email protected]> Co-authored-by: Loïc LEFEVRE <[email protected]> Co-authored-by: Loïc LEFEVRE <[email protected]>
Thanks to #172 is now possible mount (bind) straight to XE or XE/XEPDB1. And it's working ok, so far.
But, for some reason, it seems that it continues being impossible to mount (tmpfs) the very same directories. The unzip execution fails with permissions error.
To reproduce it, just try running the container with:
And you will get the zip errors.
Locally, I've workaround it by tmpfs mounting another (
XE/XEPDB2
) directory and then, in the entrypoint init sql scripts, cloning the whole XEPDB1 into XEPDB2. But it's not elegant and a waste of time.So, finally, what we have done (and seems to be working) is to just ensure the permissions always (because the tmpfs mount is performed as root). So we have done (apart from other changes) this (just in case it can be a viable solution for the upstream images):
moodlehq/moodle-db-oracle@15eba81#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557R4
With that we are able to tmpfs mount both XE or XE/XEPDB1 (and we are getting ~30 minutes quicker executions, from 4h40m down to 4h10m, aprox).
Ciao :-)
The text was updated successfully, but these errors were encountered: