#459  Build failed if redeployed with portainer
Released
bufferUnderrun opened 1 month ago

Hi,

i'm successfully running onedev in docker using portainer
image.png on a debian host.

if autodiscover, then the build return error

image_2.png

image_3.png

Thanks

Robin Shen commented 1 month ago

I tried to deploy with portainer and it works fine. Please make sure to specify volumes like below:

2021-12-09_22-09-33.png

Robin Shen commented 1 month ago

/home/robin/temp/onedev should be changed as a path on your host machine to store OneDev data.

bufferUnderrun commented 1 month ago

this is the config i set, i have a dedicated writable volume for onedev and it don't work

image_4.png

Robin Shen commented 1 month ago

OneDev currently expects a bind volume.

Robin Shen commented 1 month ago

Even mounting existing volume works at my side. The error message at your side indicates that the container id used to run inspect command is incorrect. OneDev gets this id from HOSTNAME environment variable. Please run below command to diagnose the issue:

  1. From portcontainer, check container id of OneDev
  2. Login to OneDev container by running docker exec -it <OneDev container id>
  3. Run command echo $HOSTNAME to see if this value is abbreviated form of OneDev container id
  4. Run command cat /proc/1/cpuset to see if the output contains the correct container id

Also which version of debian are you using? Is cgroups v2 and rootless container is being used?

bufferUnderrun commented 1 month ago

The container ID
image_5.png

The it output
image_6.png

You're right, they are different. Why ? And so, how to fix this ?

I'm using debian 11, cgroups v2 is support.

Robin Shen commented 1 month ago

I deployed OneDev via portainer on Debian 11, and the host name is actually abbreviated docker container id, which is expected. I am using the default bridge network. What is your network setting?

bufferUnderrun commented 1 month ago

In a first fresh deploy, the hostname in the container is the same as the container id.

I found why the container id changed : each time i edit the container and redeploy it.

So, each time i will modify or upgrade it will change. Do you have a fix to sync or hostname with container id ?

Robin Shen changed fields 1 month ago
Name Previous Value Current Value
Type
Support Request
Improvement
Robin Shen commented 1 month ago

In addition to check container by hostname, 6.1 will also check container name "onedev" if that fails.

Robin Shen changed title 1 month ago
Previous Value Current Value
job executor when onedev as container
Build failed if redeployed with portainer
Robin Shen changed fields 1 month ago
Name Previous Value Current Value
Type
Improvement
Bug
Seen Builds
empty
2102
OneDev changed state to 'Closed' 1 month ago
Previous Value Current Value
Open
Closed
No comment
Robin Shen added to milestone "6.1.0" 1 month ago
OneDev changed state to 'Released' 1 month ago
Previous Value Current Value
Closed
Released
No comment
bufferUnderrun commented 1 month ago

That's perfect, everything works !!
THANKS

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
Seen Builds
Milestones
Issue Votes (0)
Watchers (2)
Reference
issue onedev/server#459
Please wait...
Page is in error, reload to recover