oracle / docker-images

Official source of container configurations, images, and examples for Oracle products and projects
https://developer.oracle.com/use-cases/#containers
Universal Permissive License v1.0
6.53k stars 5.42k forks source link

RAC installation failed on overlay FS #839

Closed largefp2018 closed 6 years ago

largefp2018 commented 6 years ago

[root@nodec ~]# docker exec -i -t -u root racnode1 /bin/bash bash-4.2# systemctl list-units --state=failed UNIT LOAD ACTIVE SUB DESCRIPTION ● systemd-machine-id-commit.service loaded failed failed Commit a transient machine-id on disk

LOAD = Reflects whether the unit definition was properly loaded. ACTIVE = The high-level unit activation state, i.e. generalization of SUB. SUB = The low-level unit activation state, values depend on unit type.

1 loaded units listed. Pass --all to see loaded but inactive units, too. To show all installed unit files use 'systemctl list-unit-files'. bash-4.2#

psaini79 commented 6 years ago

It seems that you are testing on OVERLAY FS and seeing the following issue: https://bugzilla.redhat.com/show_bug.cgi?id=1472439

I would request to disable machine-id service and systemctl status state must be running. If the systemctl status state output is degraded or failure then RAC installation will fail.

You can automate this by using following sequence:

Script the RAC container creation command and save it as create_racnode1.sh:

==================
#!/bin/bash
#### Script Begin here####

echo "Creating RAC Container - Racnode1"
docker create -t -i --hostname racnode1 \
           --volume /boot:/boot:ro \
           --volume /dev/shm --tmpfs /dev/shm:rw,exec,size=4G \
           --volume /opt/containers/rac_host_file:/etc/hosts  \
           --dns-search=example.com \
           --device=/dev/sdc1:/dev/asm_disk1  --device=/dev/sdd1:/dev/asm_disk2 \
           --device=/dev/sde1:/dev/asm_disk3  --device=/dev/sdf1:/dev/asm_disk4 \
           --device=/dev/sdg1:/dev/asm_disk5 \
           --privileged=false  \
           --cap-add=SYS_ADMIN --cap-add=SYS_NICE \
           --cap-add=SYS_RESOURCE --cap-add=NET_ADMIN \
           -e NODE_VIP=172.15.1.160  -e VIP_HOSTNAME=racnode1-vip  \
           -e PRIV_IP=192.168.17.150  -e PRIV_HOSTNAME=racnode1-priv \
           -e PUBLIC_IP=172.15.1.150 -e PUBLIC_HOSTNAME=racnode1  \
           -e SCAN_NAME=racnode-scan -e SCAN_IP=172.15.1.70  \
           -e OP_TYPE=INSTALL -e DOMAIN=example.com \
           -e ASM_DEVICE_LIST=/dev/asm_disk1,/dev/asm_disk2,/dev/asm_disk3,/dev/asm_disk4,/dev/asm_disk5 \
           -e ORACLE_PWD="Oracle_12c" -e ASM_DISCOVERY_DIR=/dev \
           -e OS_PASSWORD=Oracle_12c \
           --restart=always --tmpfs=/run -v /sys/fs/cgroup:/sys/fs/cgroup:ro \
           --ulimit rtprio=99  \
           --name racnode1 oracle/database-rac:12.2.0.1

echo "Disconnecting Default network"
docker network disconnect  bridge racnode1
echo "Assigning  Public network to racnode1"
   docker network connect rac_pub1_nw --ip 172.15.1.150 racnode1
echo "Assigning  Private network to racnode1"
   docker network connect rac_priv1_nw --ip 192.168.17.150  racnode1
echo "Starting RAC Container - Racnode1"
docker start racnode1

echo "Fixing Failed systemd unit issue on overlay file system"
docker exec -i -t -u root racnode1 /bin/sh -c "systemctl disable systemd-machine-id-commit"
echo "Moving failed unit config file under /tmp"
docker exec -i -t -u root racnode1 /bin/bash -c "mv /usr/lib/systemd/system/systemd-machine-id-commit.service /tmp"
echo "Stopping container racnode1"
docker stop racnode1
echo "starting container racnode1"
docker start racnode1
### Script End here#####

Please try and let me know if you face any issue.

(Edited to format the script)

largefp2018 commented 6 years ago

Hi Djelibeybi,

 According to your step, This issue was solved.

Thank you very much.