[ 
https://issues.apache.org/jira/browse/FLINK-30577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17655246#comment-17655246
 ] 

James Busche commented on FLINK-30577:
--------------------------------------

So document that they should edit the configmap and restart the operator? I 
just tried that and it worked:

 

oc edit cm flink-operator-config -n openshift-operators
{quote}change:

    # kubernetes.operator.user.artifacts.base.dir: /opt/flink/artifacts

to

    kubernetes.operator.user.artifacts.base.dir: /tmp/flink/artifacts
{quote}
 

Restart the operator pod:

oc get pods -n openshift-operators
{quote}NAME                                         READY   STATUS    RESTARTS  
 AGE

flink-kubernetes-operator-5f5bb584db-t75ts   2/2     Running   0          4m45s
{quote}
oc delete pod flink-kubernetes-operator-5f5bb584db-t75ts -n openshift-operators

 

Then in a non-default namespace the session jobs work:

oc get flinksessionjobs -n jim
{quote}NAME                             JOB STATUS   RECONCILIATION STATUS

basic-session-job-example        RUNNING      DEPLOYED

basic-session-job-example2       RUNNING      DEPLOYED

basic-session-job-only-example   RUNNING      DEPLOYED
{quote}

> OpenShift FlinkSessionJob artifact write error on non-default namespaces
> ------------------------------------------------------------------------
>
>                 Key: FLINK-30577
>                 URL: https://issues.apache.org/jira/browse/FLINK-30577
>             Project: Flink
>          Issue Type: Bug
>          Components: Kubernetes Operator
>    Affects Versions: kubernetes-operator-1.3.0
>            Reporter: James Busche
>            Priority: Major
>
> [~tagarr] has pointed out an issue with using the /opt/flink/artifacts 
> filesystem on OpenShift in non-default namespaces.  The OpenShift permissions 
> don't allow write to /opt.  
> ```
> org.apache.flink.util.FlinkRuntimeException: Failed to create the dir: 
> /opt/flink/artifacts/jim/basic-session-deployment-only-example/basic-session-job-only-example
> ```
> A few ways to solve the problem are:
> 1. Remove the comment on line 34 here in 
> [flink-conf.yaml|https://github.com/apache/flink-kubernetes-operator/blob/main/helm/flink-kubernetes-operator/conf/flink-conf.yaml#L34]
>  and change it to: /tmp/flink/artifacts
> 2. Append this after line 143 here in 
> [values.yaml|https://github.com/apache/flink-kubernetes-operator/blob/main/helm/flink-kubernetes-operator/values.yaml#L142]:
> kubernetes.operator.user.artifacts.base.dir: /tmp/flink/artifacts
> 3.  Changing it in line 142 of 
> [KubernetesOperatorConfigOptions.java|https://github.com/apache/flink-kubernetes-operator/blob/main/flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/config/KubernetesOperatorConfigOptions.java#L142]
>  like this:
> .defaultValue("/tmp/flink/artifacts") 
> and then rebuilding the operator image.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to