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_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:
|
||||
- backend
|
||||
backend:
|
||||
#build: ./backend
|
||||
image: ghcr.io/frikky/shuffle-backend:0.8.3
|
||||
build: ./backend
|
||||
image: ghcr.io/frikky/shuffle-backend:0.8.4
|
||||
container_name: shuffle-backend
|
||||
hostname: ${BACKEND_HOSTNAME}
|
||||
# Here for debugging:
|
||||
@@ -45,7 +45,7 @@ services:
|
||||
- database
|
||||
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
|
||||
hostname: shuffle-orborus
|
||||
networks:
|
||||
|
||||
@@ -1582,8 +1582,13 @@ const Admin = (props) => {
|
||||
/>
|
||||
</ListItem>
|
||||
{users === undefined ? null : users.map((data, index) => {
|
||||
var bgColor = "#27292d"
|
||||
if (index % 2 === 0) {
|
||||
bgColor = "#1f2023"
|
||||
}
|
||||
|
||||
return (
|
||||
<ListItem key={index}>
|
||||
<ListItem key={index} style={{backgroundColor: bgColor}}>
|
||||
<ListItemText
|
||||
primary={data.username}
|
||||
style={{ minWidth: 200, maxWidth: 200 }}
|
||||
@@ -1788,8 +1793,13 @@ const Admin = (props) => {
|
||||
/>
|
||||
</ListItem>
|
||||
{schedules === undefined || schedules === null ? null : schedules.map((schedule, index) => {
|
||||
var bgColor = "#27292d"
|
||||
if (index % 2 === 0) {
|
||||
bgColor = "#1f2023"
|
||||
}
|
||||
|
||||
return (
|
||||
<ListItem key={index}>
|
||||
<ListItem key={index} style={{backgroundColor: bgColor}}>
|
||||
<ListItemText
|
||||
style={{maxWidth: 200, minWidth: 200}}
|
||||
primary={schedule.environment === "cloud" ? schedule.frequency : <span>{schedule.seconds} seconds</span>}
|
||||
@@ -1938,8 +1948,13 @@ const Admin = (props) => {
|
||||
/>
|
||||
</ListItem>
|
||||
{authentication === undefined ? null : authentication.map((data, index) => {
|
||||
var bgColor = "#27292d"
|
||||
if (index % 2 === 0) {
|
||||
bgColor = "#1f2023"
|
||||
}
|
||||
|
||||
return (
|
||||
<ListItem key={index}>
|
||||
<ListItem key={index} style={{backgroundColor: bgColor}}>
|
||||
<ListItemText
|
||||
primary=<img alt="" src={data.app.large_image} style={{maxWidth: 50,}} />
|
||||
style={{minWidth: 150, maxWidth: 150}}
|
||||
@@ -2046,6 +2061,11 @@ const Admin = (props) => {
|
||||
return null
|
||||
}
|
||||
|
||||
//var bgColor = "#27292d"
|
||||
//if (index % 2 === 0) {
|
||||
// bgColor = "#1f2023"
|
||||
//}
|
||||
|
||||
return (
|
||||
<ListItem key={index}>
|
||||
<ListItemText
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
NAME=shuffle-orborus
|
||||
VERSION=0.8.3
|
||||
VERSION=0.8.31
|
||||
|
||||
echo "Running docker build with $NAME:$VERSION"
|
||||
#docker rmi frikky/shuffle:$NAME --force
|
||||
|
||||
@@ -103,13 +103,25 @@ func getThisContainerId() {
|
||||
out, err := exec.Command("bash", "-c", cmd).Output()
|
||||
if err == nil {
|
||||
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 {
|
||||
containerId = "shuffle-orborus"
|
||||
log.Printf("Failed getting container ID: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
log.Printf("Started with containerId %s", containerId)
|
||||
}
|
||||
|
||||
// Deploys the internal worker whenever something happens
|
||||
// https://docs.docker.com/engine/api/sdk/examples/
|
||||
func deployWorker(image string, identifier string, env []string) {
|
||||
// Binds is the actual "-v" volume.
|
||||
hostConfig := &container.HostConfig{
|
||||
@@ -135,12 +147,13 @@ func deployWorker(image string, identifier string, env []string) {
|
||||
Env: env,
|
||||
}
|
||||
|
||||
log.Printf("Identifier: %s", identifier)
|
||||
log.Printf("[INFO] Identifier: %s", identifier)
|
||||
cont, err := dockercli.ContainerCreate(
|
||||
context.Background(),
|
||||
config,
|
||||
hostConfig,
|
||||
nil,
|
||||
nil,
|
||||
identifier,
|
||||
)
|
||||
|
||||
@@ -154,6 +167,7 @@ func deployWorker(image string, identifier string, env []string) {
|
||||
config,
|
||||
hostConfig,
|
||||
nil,
|
||||
nil,
|
||||
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 {
|
||||
log.Printf("[ERROR] Failed to start container in environment %s: %s", environment, err)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user