-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13399 from giuseppe/system-containers-notify
Merged by openshift-bot
- Loading branch information
Showing
18 changed files
with
97 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"version": "1.0", | ||
"defaultValues": { | ||
"ORIGIN_CONFIG_DIR": "/etc/origin", | ||
"ORIGIN_DATA_DIR": "/var/lib/origin", | ||
"MASTER_SERVICE": "atomic-openshift-master.service", | ||
"DOCKER_SERVICE": "docker.service", | ||
"OPENVSWITCH_SERVICE": "openvswitch.service" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
d /var/lib/origin - - - - - | ||
d $ORIGIN_DATA_DIR - - - - - | ||
d /var/lib/cni - - - - - | ||
d /var/run/secrets - - - - - | ||
d /etc/origin/sdn - - - - - | ||
d $ORIGIN_CONFIG_DIR/sdn - - - - - | ||
d $ORIGIN_CONFIG_DIR/cloudprovider - - - - - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"version": "1.0", | ||
"defaultValues": { | ||
"ORIGIN_CONFIG_DIR": "/etc/origin", | ||
"DOCKER_SERVICE": "docker.service" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 26 additions & 1 deletion
27
images/openvswitch/system-container/system-container-wrapper.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,29 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
source /run/$NAME-env | ||
|
||
MAINPID=`sed -n -e "/^PPid/ s|PPid:\t||p" /proc/$$/status` | ||
|
||
# openvswitch 2.4 has no systemd-notify support, so add it here. | ||
# Workaround for a bug in systemd-notify 219. Whenever used with --pid, systemd-notify 219 | ||
# sends an incorrect packet to $NOTIFY_SOCKET and the process hangs. | ||
# Newer versions of systemd-notify don't have this issue, and also this change in runc, | ||
# even if addressing another issue: https://github.com/opencontainers/runc/pull/1308 | ||
# will ensure once it gets in a release that the notify events are properly propagated. | ||
if test -n ${NOTIFY_SOCKET-}; then | ||
/usr/share/openvswitch/scripts/ovs-ctl status | ||
while /usr/share/openvswitch/scripts/ovs-ctl status | grep -q "not running"; do | ||
sleep 1 | ||
done | ||
ps aux | grep $MAINPID | ||
python - << EOF | ||
import socket | ||
import os | ||
s = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM) | ||
e = os.getenv('NOTIFY_SOCKET') | ||
s.connect(e) | ||
s.sendall('MAINPID=%i\nREADY=1\n' % $MAINPID) | ||
s.close() | ||
EOF | ||
fi & | ||
|
||
exec /usr/local/bin/ovs-run.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
d /etc/origin/openvswitch - - - - - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
{ | ||
"version": "1.0", | ||
"defaultValues": { | ||
"COMMAND": "" | ||
"COMMAND": "", | ||
"ORIGIN_CONFIG_DIR": "/etc/origin", | ||
"ORIGIN_DATA_DIR": "/var/lib/origin", | ||
"ETCD_SERVICE": "etcd.service", | ||
"NODE_SERVICE": "atomic-openshift-node.service" | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
d $ORIGIN_CONFIG_DIR - - - - - | ||
d $ORIGIN_DATA_DIR - - - - - |