Skip to content

Need to delete domain job before re-running create-domain-job.sh #67

@rosepan

Description

@rosepan

In order to re-run create-domain-job.sh to re-create a domain, we need to shutdown the domain, remove the domain (including the removing of the domain directory) as mentioned in the doc README.md.

However, the doc does not mention the removal of the domain job.

If the domain job exists and we re-run the create-domain-job.sh, the shell script deletes the job first, re-create it next. This is correct and make sense. But then somehow the pod for the domain job cannot be created because it complains the domain directory already exists. This causes the create-domain-job.sh failed.

Apparently the domain directory has been manually removed before the create-domain-job.sh is re-run. Not sure when the domain directory is re-created during the run.

Here is the command console output:

====================
The persistent volume domain1-pv001 already exists and will not be re-created
Checking if the persistent volume claim domain1-pv001-claim already exists
The persistent volume claim domain1-pv001-claim already exists and will not be re-created
Checking if object type job with name domain-domain1-job exists
Deleting domain-domain1-job using /scratch/rpan/wls-decoperator/weblogic-operator/kubernetes/domain-job.yaml
job "domain-domain1-job" deleted
configmap "domain-domain1-scripts" deleted
Creating the domain by creating the job /scratch/rpan/wls-decoperator/weblogic-operator/kubernetes/domain-job.yaml
job "domain-domain1-job" created
configmap "domain-domain1-scripts" created
Waiting for the job to complete...
status on iteration 1 of 10
pod domain-domain1-job-03jsk status is Error
pod domain-domain1-job-3bkjc status is Error
pod domain-domain1-job-54wg9 status is Error
pod domain-domain1-job-fx149 status is Error

===============

The pod log shows: Error: /shared/domain/base_domain already exists.

If manually delete the domain job and the domain directory first, the create-domain-job.sh can be finished correctly.

Is this a code issue or a doc issue? If it's a doc issue, please update the doc to add the domain job removal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions