BUG: Issue with cgroups in Docker on certain servers
This commit is contained in:
@@ -39,4 +39,4 @@ SHUFFLE_PASS_WORKER_PROXY=TRUE
|
|||||||
|
|
||||||
SHUFFLE_BASE_IMAGE_REGISTRY=ghcr.io
|
SHUFFLE_BASE_IMAGE_REGISTRY=ghcr.io
|
||||||
SHUFFLE_BASE_IMAGE_NAME=frikky
|
SHUFFLE_BASE_IMAGE_NAME=frikky
|
||||||
SHUFFLE_BASE_IMAGE_TAG_SUFFIX="-0.8.0"
|
SHUFFLE_BASE_IMAGE_TAG_SUFFIX="-0.8.3"
|
||||||
|
|||||||
+3
-3
@@ -16,8 +16,8 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- backend
|
- backend
|
||||||
backend:
|
backend:
|
||||||
#build: ./backend
|
build: ./backend
|
||||||
image: ghcr.io/frikky/shuffle-backend:0.8.3
|
image: ghcr.io/frikky/shuffle-backend:0.8.4
|
||||||
container_name: shuffle-backend
|
container_name: shuffle-backend
|
||||||
hostname: ${BACKEND_HOSTNAME}
|
hostname: ${BACKEND_HOSTNAME}
|
||||||
# Here for debugging:
|
# Here for debugging:
|
||||||
@@ -45,7 +45,7 @@ services:
|
|||||||
- database
|
- database
|
||||||
orborus:
|
orborus:
|
||||||
#build: ./functions/onprem/orborus
|
#build: ./functions/onprem/orborus
|
||||||
image: ghcr.io/frikky/shuffle-orborus:0.8.3
|
image: ghcr.io/frikky/shuffle-orborus:0.8.31
|
||||||
container_name: shuffle-orborus
|
container_name: shuffle-orborus
|
||||||
hostname: shuffle-orborus
|
hostname: shuffle-orborus
|
||||||
networks:
|
networks:
|
||||||
|
|||||||
@@ -1582,8 +1582,13 @@ const Admin = (props) => {
|
|||||||
/>
|
/>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
{users === undefined ? null : users.map((data, index) => {
|
{users === undefined ? null : users.map((data, index) => {
|
||||||
|
var bgColor = "#27292d"
|
||||||
|
if (index % 2 === 0) {
|
||||||
|
bgColor = "#1f2023"
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ListItem key={index}>
|
<ListItem key={index} style={{backgroundColor: bgColor}}>
|
||||||
<ListItemText
|
<ListItemText
|
||||||
primary={data.username}
|
primary={data.username}
|
||||||
style={{ minWidth: 200, maxWidth: 200 }}
|
style={{ minWidth: 200, maxWidth: 200 }}
|
||||||
@@ -1788,8 +1793,13 @@ const Admin = (props) => {
|
|||||||
/>
|
/>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
{schedules === undefined || schedules === null ? null : schedules.map((schedule, index) => {
|
{schedules === undefined || schedules === null ? null : schedules.map((schedule, index) => {
|
||||||
|
var bgColor = "#27292d"
|
||||||
|
if (index % 2 === 0) {
|
||||||
|
bgColor = "#1f2023"
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ListItem key={index}>
|
<ListItem key={index} style={{backgroundColor: bgColor}}>
|
||||||
<ListItemText
|
<ListItemText
|
||||||
style={{maxWidth: 200, minWidth: 200}}
|
style={{maxWidth: 200, minWidth: 200}}
|
||||||
primary={schedule.environment === "cloud" ? schedule.frequency : <span>{schedule.seconds} seconds</span>}
|
primary={schedule.environment === "cloud" ? schedule.frequency : <span>{schedule.seconds} seconds</span>}
|
||||||
@@ -1938,8 +1948,13 @@ const Admin = (props) => {
|
|||||||
/>
|
/>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
{authentication === undefined ? null : authentication.map((data, index) => {
|
{authentication === undefined ? null : authentication.map((data, index) => {
|
||||||
|
var bgColor = "#27292d"
|
||||||
|
if (index % 2 === 0) {
|
||||||
|
bgColor = "#1f2023"
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ListItem key={index}>
|
<ListItem key={index} style={{backgroundColor: bgColor}}>
|
||||||
<ListItemText
|
<ListItemText
|
||||||
primary=<img alt="" src={data.app.large_image} style={{maxWidth: 50,}} />
|
primary=<img alt="" src={data.app.large_image} style={{maxWidth: 50,}} />
|
||||||
style={{minWidth: 150, maxWidth: 150}}
|
style={{minWidth: 150, maxWidth: 150}}
|
||||||
@@ -2046,6 +2061,11 @@ const Admin = (props) => {
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//var bgColor = "#27292d"
|
||||||
|
//if (index % 2 === 0) {
|
||||||
|
// bgColor = "#1f2023"
|
||||||
|
//}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ListItem key={index}>
|
<ListItem key={index}>
|
||||||
<ListItemText
|
<ListItemText
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
NAME=shuffle-orborus
|
NAME=shuffle-orborus
|
||||||
VERSION=0.8.3
|
VERSION=0.8.31
|
||||||
|
|
||||||
echo "Running docker build with $NAME:$VERSION"
|
echo "Running docker build with $NAME:$VERSION"
|
||||||
#docker rmi frikky/shuffle:$NAME --force
|
#docker rmi frikky/shuffle:$NAME --force
|
||||||
|
|||||||
@@ -103,13 +103,25 @@ func getThisContainerId() {
|
|||||||
out, err := exec.Command("bash", "-c", cmd).Output()
|
out, err := exec.Command("bash", "-c", cmd).Output()
|
||||||
if err == nil {
|
if err == nil {
|
||||||
containerId = strings.TrimSpace(string(out))
|
containerId = strings.TrimSpace(string(out))
|
||||||
|
|
||||||
|
// cgroup error. Hardcoding this.
|
||||||
|
// https://github.com/moby/moby/issues/7015
|
||||||
|
log.Printf("Checking if %s is in %s", ".scope", string(out))
|
||||||
|
if strings.Contains(string(out), ".scope") {
|
||||||
|
containerId = "shuffle-orborus"
|
||||||
|
//docker-76c537e9a4b7c7233011f5d70e6b7f2d600b6413ac58a96519b8dca7a3f7117a.scope
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
containerId = "shuffle-orborus"
|
||||||
log.Printf("Failed getting container ID: %s", err)
|
log.Printf("Failed getting container ID: %s", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Printf("Started with containerId %s", containerId)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deploys the internal worker whenever something happens
|
// Deploys the internal worker whenever something happens
|
||||||
|
// https://docs.docker.com/engine/api/sdk/examples/
|
||||||
func deployWorker(image string, identifier string, env []string) {
|
func deployWorker(image string, identifier string, env []string) {
|
||||||
// Binds is the actual "-v" volume.
|
// Binds is the actual "-v" volume.
|
||||||
hostConfig := &container.HostConfig{
|
hostConfig := &container.HostConfig{
|
||||||
@@ -135,12 +147,13 @@ func deployWorker(image string, identifier string, env []string) {
|
|||||||
Env: env,
|
Env: env,
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Printf("Identifier: %s", identifier)
|
log.Printf("[INFO] Identifier: %s", identifier)
|
||||||
cont, err := dockercli.ContainerCreate(
|
cont, err := dockercli.ContainerCreate(
|
||||||
context.Background(),
|
context.Background(),
|
||||||
config,
|
config,
|
||||||
hostConfig,
|
hostConfig,
|
||||||
nil,
|
nil,
|
||||||
|
nil,
|
||||||
identifier,
|
identifier,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -154,6 +167,7 @@ func deployWorker(image string, identifier string, env []string) {
|
|||||||
config,
|
config,
|
||||||
hostConfig,
|
hostConfig,
|
||||||
nil,
|
nil,
|
||||||
|
nil,
|
||||||
identifier,
|
identifier,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -167,7 +181,8 @@ func deployWorker(image string, identifier string, env []string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
err = dockercli.ContainerStart(context.Background(), cont.ID, types.ContainerStartOptions{})
|
containerStartOptions := types.ContainerStartOptions{}
|
||||||
|
err = dockercli.ContainerStart(context.Background(), cont.ID, containerStartOptions)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("[ERROR] Failed to start container in environment %s: %s", environment, err)
|
log.Printf("[ERROR] Failed to start container in environment %s: %s", environment, err)
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user