Resource issues when creating an Oracle database using a pipeline
Asked by Prabha Ranaweera:

I want to create a Oracle Database docker image using a bitbucket pipeline. For now the pipeline runs in the default build container using a customized docker image. However the pipelines fails due to missing files. The reason for the missing files is that the Oracle installation has not happened correctly. The Oracle installation logs shows the following errors:

INFO: \[Sep 13, 2022 4:14:08 PM\] Expected Value:16GB (1.6777216E7KB)  
INFO: \[Sep 13, 2022 4:14:08 PM\] Actual Value:0.0 bytes  
INFO: \[Sep 13, 2022 4:14:08 PM\] Error Message:PRVF-7573 : Sufficient swap size is not available on node "96fb79250bf1" \[Required = 16GB (1.6777216E7KB) ; Found = 0.0 bytes\]  
INFO: \[Sep 13, 2022 4:14:08 PM\] Cause: The swap size found does not meet the minimum requirement.  
INFO: \[Sep 13, 2022 4:14:08 PM\] Action: Increase swap size to at least meet the minimum swap space requirement.

It looks like the build container does not have enough resources to complete the Oracle installation.

Here is the pipeline step

- step: \&build_ifsapp_db  
name: build_ifsapp_db  
size: 2x  
script:  
- export COMMIT_VERSION=\`echo ${BITBUCKET_BRANCH} \| sed 's/\\///g'\`  
- export IMAGE="ifsapp-db"  
- cd $NAME_PREFIX/pipeline_scripts  
- chmod +x ./build_image_ifsapp-db.sh  
- HOST_UID=\`id -u\` TRACE=true ./build_image_ifsapp-db.sh  
condition:  
changesets:  
includePaths:  
- ifs/ifsapp-db/\*\*  
artifacts: # results of the security scan  
#- ifs/ifs-db-init/target/db_init.jar  
- ifs/pipeline_scripts/\*.txt  
services:  
- docker  
caches:  
- docker  
- trivycache  
How can I increase the resources needed for this step.


Answers:
author: Pasindu Weerasinghe
body: [@Patrik S](/t5/user/viewprofilepage/user-id/4603309) Now we are using a runner to run the pipeline but again we are facing a issue where one of the kernel parameters required by Oracle is not getting set.
>
> ```
> INFO: [Sep 21, 2022 11:06:37 AM] *********************************************
> INFO: [Sep 21, 2022 11:06:37 AM] OS Kernel Parameter: shmall: This is a prerequisite condition to test whether the OS kernel parameter "shmall" is properly set.
> INFO: [Sep 21, 2022 11:06:37 AM] Severity:IGNORABLE
> INFO: [Sep 21, 2022 11:06:37 AM] OverallStatus:VERIFICATION_FAILED
> INFO: [Sep 21, 2022 11:06:37 AM] -----------------------------------------------
> INFO: [Sep 21, 2022 11:06:37 AM] Verification Result for Node:514de4f75d47
> INFO: [Sep 21, 2022 11:06:37 AM] Expected Value:2251799813685247
> INFO: [Sep 21, 2022 11:06:37 AM] Actual Value:Current=18446744073692774000; Configured=1073741824
> INFO: [Sep 21, 2022 11:06:37 AM] Error Message:PRVG-1201 : OS kernel parameter "shmall" does not have expected configured value on node "514de4f75d47" [Expected = "2251799813685247" ; Current = "18446744073692774000"; Configured = "1073741824"].
> INFO: [Sep 21, 2022 11:06:37 AM] Cause: A check of the configured value for an OS kernel parameter did not find the expected value.
> INFO: [Sep 21, 2022 11:06:37 AM] Action: Modify the kernel parameter configured value to meet the requirement.
> INFO: [Sep 21, 2022 11:06:37 AM] -----------------------------------------------
> INFO: [Sep 21, 2022 11:06:37 AM] *********************************************
> ```

On the runner itself, I have set the required kernel parameters parameter.

```
[root@pweelk-ifsapp-runner ~]# sysctl -a - | grep kernel.shmall
kernel.shmall = 2251799813685247
[root@pweelk-ifsapp-runner ~]#
```


author: Patrik S
body: Hello [@Prabha Ranaweera](/t5/user/viewprofilepage/user-id/5030619) ,

Welcome to Atlassian Community!

From the error message you reported, it seems like the oracle program checks for the available swap memory as one of the requirements to proceed with the installation. The bitbucket cloud runners do not provide swap memory, and this is likely the reason why you are facing this error.

In this case, I would suggest you try using self-hosted runners, where you can allocate more memory to your build (up to 32GB) and might be able to access the runner's host swap memory. More details about how to configure runners are outlined in the following documentation :

* <https://support.atlassian.com/bitbucket-cloud/docs/runners/>

Thank you, [@Prabha Ranaweera](/t5/user/viewprofilepage/user-id/5030619) .

Kind regards,

Patrik S

comments: author: Prabha Ranaweera
body: Thank you for the response. We are trying this with a self hosted runner now and will get back to you on how that goes.

Regards,

Prabha


Tags: bitbucket-cloud

cloud