yet-another-docker-plugin icon indicating copy to clipboard operation
yet-another-docker-plugin copied to clipboard

Remote FS Root Mapping problem

Open farahfa opened this issue 9 years ago • 13 comments

Hello,

So every time I set a value for Remote FS Root Mapping in the Global settings then save it and then go back to the page it goes back to being empty!

And it doesn't even show up in the config.xml:

<com.github.kostyasha.yad.DockerSlaveTemplate>
  <id>aa35a978-7868-4ea5-b689-f8bdc0515b79</id>
  <labelString>jdk8-maven3</labelString>
  <launcher class="com.github.kostyasha.yad.launcher.DockerComputerSSHLauncher">
    <sshConnector plugin="[email protected]">
      <port>22</port>
      <credentialsId>75b007ba-5f38-4ce3-9eef-92101e286734</credentialsId>
      <jvmOptions></jvmOptions>
      <javaPath></javaPath>
      <maxNumRetries>0</maxNumRetries>
      <retryWaitTime>0</retryWaitTime>
    </sshConnector>
  </launcher>
  <remoteFs>/var/lib/jenkins</remoteFs>
  <maxCapacity>25</maxCapacity>
  <mode>EXCLUSIVE</mode>
  <retentionStrategy class="com.github.kostyasha.yad.strategy.DockerOnceRetentionStrategy">
    <idleMinutes>10</idleMinutes>
    <idleMinutes defined-in="com.github.kostyasha.yad.strategy.DockerOnceRetentionStrategy">10</idleMinutes>
  </retentionStrategy>
  <numExecutors>1</numExecutors>
  <dockerContainerLifecycle>
    <image>AWSID.dkr.ecr.us-east-1.amazonaws.com/jenkins-slave:jdk8-maven3-2.2</image>
    <pullImage>
      <pullStrategy>PULL_NEVER</pullStrategy>
      <credentialsId></credentialsId>
    </pullImage>
    <createContainer>
      <command></command>
      <hostname></hostname>
      <dnsHosts class="java.util.Collections$UnmodifiableRandomAccessList" resolves-to="java.util.Collections$UnmodifiableList">
        <c class="list"/>
        <list reference="../c"/>
      </dnsHosts>
      <volumes class="java.util.Collections$UnmodifiableRandomAccessList" resolves-to="java.util.Collections$UnmodifiableList">
        <c class="list">
          <string>/var/lib/jenkins:/var/lib/jenkins</string>
        </c>
        <list reference="../c"/>
      </volumes>
      <volumesFrom class="java.util.Collections$UnmodifiableRandomAccessList" resolves-to="java.util.Collections$UnmodifiableList">
        <c class="list"/>
        <list reference="../c"/>
      </volumesFrom>
      <environment class="java.util.Collections$UnmodifiableRandomAccessList" resolves-to="java.util.Collections$UnmodifiableList">
        <c class="list"/>
        <list reference="../c"/>
      </environment>
      <bindPorts></bindPorts>
      <bindAllPorts>true</bindAllPorts>
      <memoryLimit>2000</memoryLimit>
      <privileged>false</privileged>
      <tty>false</tty>
      <extraHosts class="java.util.Collections$UnmodifiableRandomAccessList" resolves-to="java.util.Collections$UnmodifiableList">
        <c class="list"/>
        <list reference="../c"/>
      </extraHosts>
      <devices class="java.util.Collections$UnmodifiableRandomAccessList" resolves-to="java.util.Collections$UnmodifiableList">
        <c class="list"/>
        <list reference="../c"/>
      </devices>
      <cpusetCpus></cpusetCpus>
      <cpusetMems></cpusetMems>
    </createContainer>
    <stopContainer>
      <timeout>10</timeout>
    </stopContainer>
    <removeContainer>
      <removeVolumes>false</removeVolumes>
      <force>false</force>
    </removeContainer>
  </dockerContainerLifecycle>
  <nodeProperties/>
</com.github.kostyasha.yad.DockerSlaveTemplate>

Which then results in Error: no workspace:

screen shot 2016-09-06 at 10 59 22 am

There are no relevant logs about this particular issue (so I couldn't debug), and also this was working just fine with the other docker-plugin.

farahfa avatar Sep 06 '16 15:09 farahfa

It unimplented feature. .

On 6 Sep 2016 6:02 p.m., "Fadi Farah" [email protected] wrote:

Hello,

So every time I set a value for Remote FS Root Mapping in the Global settings then save it and then go back to the page it goes back to being empty!

And it doesn't even show up in the config.xml:

    <com.github.kostyasha.yad.DockerSlaveTemplate>
      <id>aa35a978-7868-4ea5-b689-f8bdc0515b79</id>
      <labelString>jdk8-maven3</labelString>
      <launcher class="com.github.kostyasha.yad.launcher.DockerComputerSSHLauncher">
        <sshConnector plugin="[email protected]">
          <port>22</port>
          <credentialsId>75b007ba-5f38-4ce3-9eef-92101e286734</credentialsId>
          <jvmOptions></jvmOptions>
          <javaPath></javaPath>
          <maxNumRetries>0</maxNumRetries>
          <retryWaitTime>0</retryWaitTime>
        </sshConnector>
      </launcher>
      <remoteFs>/var/lib/jenkins</remoteFs>
      <maxCapacity>25</maxCapacity>
      <mode>EXCLUSIVE</mode>
      <retentionStrategy class="com.github.kostyasha.yad.strategy.DockerOnceRetentionStrategy">
        <idleMinutes>10</idleMinutes>
        <idleMinutes defined-in="com.github.kostyasha.yad.strategy.DockerOnceRetentionStrategy">10</idleMinutes>
      </retentionStrategy>
      <numExecutors>1</numExecutors>
      <dockerContainerLifecycle>
        <image>AWSID.dkr.ecr.us-east-1.amazonaws.com/jenkins-slave:jdk8-maven3-2.2</image>
        <pullImage>
          <pullStrategy>PULL_NEVER</pullStrategy>
          <credentialsId></credentialsId>
        </pullImage>
        <createContainer>
          <command></command>
          <hostname></hostname>
          <dnsHosts class="java.util.Collections$UnmodifiableRandomAccessList" resolves-to="java.util.Collections$UnmodifiableList">
            <c class="list"/>
            <list reference="../c"/>
          </dnsHosts>
          <volumes class="java.util.Collections$UnmodifiableRandomAccessList" resolves-to="java.util.Collections$UnmodifiableList">
            <c class="list">
              <string>/var/lib/jenkins:/var/lib/jenkins</string>
            </c>
            <list reference="../c"/>
          </volumes>
          <volumesFrom class="java.util.Collections$UnmodifiableRandomAccessList" resolves-to="java.util.Collections$UnmodifiableList">
            <c class="list"/>
            <list reference="../c"/>
          </volumesFrom>
          <environment class="java.util.Collections$UnmodifiableRandomAccessList" resolves-to="java.util.Collections$UnmodifiableList">
            <c class="list"/>
            <list reference="../c"/>
          </environment>
          <bindPorts></bindPorts>
          <bindAllPorts>true</bindAllPorts>
          <memoryLimit>2000</memoryLimit>
          <privileged>false</privileged>
          <tty>false</tty>
          <extraHosts class="java.util.Collections$UnmodifiableRandomAccessList" resolves-to="java.util.Collections$UnmodifiableList">
            <c class="list"/>
            <list reference="../c"/>
          </extraHosts>
          <devices class="java.util.Collections$UnmodifiableRandomAccessList" resolves-to="java.util.Collections$UnmodifiableList">
            <c class="list"/>
            <list reference="../c"/>
          </devices>
          <cpusetCpus></cpusetCpus>
          <cpusetMems></cpusetMems>
        </createContainer>
        <stopContainer>
          <timeout>10</timeout>
        </stopContainer>
        <removeContainer>
          <removeVolumes>false</removeVolumes>
          <force>false</force>
        </removeContainer>
      </dockerContainerLifecycle>
      <nodeProperties/>
    </com.github.kostyasha.yad.DockerSlaveTemplate>

Which then results in Error: no workspace

[image: screen shot 2016-09-06 at 10 59 22 am] https://cloud.githubusercontent.com/assets/9218600/18278698/08e1a5e8-7421-11e6-8d38-1ecc67d57030.png

There are no relevant logs about this particular issue (so I couldn't debug), and also this was working just fine with the other docker-plugin https://wiki.jenkins-ci.org/display/JENKINS/Docker+Plugin.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/KostyaSha/yet-another-docker-plugin/issues/78, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOIu2G67EqLH9T5pnsbwANMcKUcl5W6ks5qnYBtgaJpZM4J18Cq .

KostyaSha avatar Sep 06 '16 15:09 KostyaSha

Oh, well that makes sense now lol.. So there's no way to show workspace in Jenkins Master as of now?

farahfa avatar Sep 06 '16 15:09 farahfa

Could be added easily. But do you really mount docker dirs into Jenkins master?

KostyaSha avatar Sep 06 '16 15:09 KostyaSha

Sorry I'm confused with issues from mobile :)

KostyaSha avatar Sep 06 '16 16:09 KostyaSha

In config you have pull never strategy, do you have image in daemon?

On 6 Sep 2016 6:36 p.m., "Kanstantsin Shautsou" [email protected] wrote:

Could be added easily. But do you really mount docker dirs into Jenkins master?

On 6 Sep 2016 6:09 p.m., "Fadi Farah" [email protected] wrote:

Oh, well that makes sense now lol.. So there's no way to show workspace in Jenkins Master as of now?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/KostyaSha/yet-another-docker-plugin/issues/78#issuecomment-244981978, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOIu5fQHtJBX41fDY8Gbs5Ggn-QdpqIks5qnYI-gaJpZM4J18Cq .

KostyaSha avatar Sep 06 '16 16:09 KostyaSha

Oh, well that makes sense now lol.. So there's no way to show workspace in Jenkins Master as of now?

The problem is that mounting FS into master is bad from system part. I disabled it because thought to have other feature i.e. commit and push container in the end of build (almost implemented), then this would be a question for registry to allow browsing files. But if you need this FS mapping, then i can add it back.

KostyaSha avatar Sep 06 '16 17:09 KostyaSha

I also thinks this feature should be in plugin :)

zalent avatar Oct 05 '16 07:10 zalent

Yes please, I like it to! To have the job it's workspace is very convenient for solving build issues

roegema avatar Feb 14 '17 21:02 roegema

Wouldn't help simply commit and push container? Then you can debug it locally

KostyaSha avatar Feb 14 '17 21:02 KostyaSha

Hello @KostyaSha, seems like this feature is still isn't implemented? It would be great if you can implement this feature because then the plugin would be perfect for us. We view the files in the workspace often and it really makes things unnecessarily harder when we cannot do so. We had to roll back to the other docker plugin because of this (but recently went back to your plugin because it works way better with a docker swarm setup).

farahfa avatar Mar 30 '17 18:03 farahfa

Agree, we too like this functionality. At the moment we use the copy-to-slave plugin to copy the workspace to a predefined location on the master. In this case the workspace files are copied successfully but we have to use a workaround to actually see the workspace from Jenkins itself. I know this is not a YADP issue but it makes our life (and our users) less complex with the implemented feature. Also the combination with a Docker Swarm setup is great. Keep up the good work!

roegema avatar Mar 31 '17 11:03 roegema

+1

glasn avatar Mar 31 '17 13:03 glasn

@roegema You mentioned that you are using a workaround after copying the workspace to master. Could you please let me know what workaround are you using to see it from Jenkins itself.

jayamantri avatar Aug 13 '18 19:08 jayamantri