-
Notifications
You must be signed in to change notification settings - Fork 433
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 #6250 from coolo/merge_master_staging
Merge master into staging-workflow
- Loading branch information
Showing
269 changed files
with
10,785 additions
and
3,065 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
This file was deleted.
Oops, something went wrong.
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,11 @@ | ||
[Unit] | ||
Description=OBS API Setup | ||
Before=apache2.service | ||
After=network-online.target | ||
|
||
[Service] | ||
Type=oneshot | ||
ExecStart=/usr/lib/obs/server/setup-appliance.sh --non-interactive --setup-only | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
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
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,42 +1,48 @@ | ||
#!/bin/bash | ||
|
||
export BOOTSTRAP_TEST_MODE=1 | ||
export NON_INTERACTIVE=1 | ||
export BASH_TAP_ROOT=$(dirname $0) | ||
|
||
. $(dirname $0)/bash-tap-bootstrap | ||
|
||
plan tests 2 | ||
|
||
for i in $(dirname $0)/../setup-appliance.sh /usr/lib/obs/server/setup-appliance.sh;do | ||
[[ -f $i && -z $SETUP_APPLIANCE ]] && SETUP_APPLIANCE=$i | ||
done | ||
|
||
if [[ -z $SETUP_APPLIANCE ]];then | ||
BAIL_OUT "Could not find setup appliance" | ||
fi | ||
|
||
. $SETUP_APPLIANCE | ||
|
||
MAX_WAIT=300 | ||
|
||
tmpcount=$MAX_WAIT | ||
|
||
# Service enabled and started | ||
for srv in \ | ||
obsapisetup | ||
do | ||
STATE=` systemctl is-enabled $srv\.service 2>/dev/null` | ||
is "$STATE" "enabled" "Checking $srv enabled" | ||
ACTIVE=`systemctl is-active $srv\.service` | ||
while [[ $ACTIVE != 'active' ]];do | ||
tmpcount=$(( $tmpcount - 1 )) | ||
ACTIVE=`systemctl is-active $srv\.service` | ||
if [[ $tmpcount -le 0 ]];then | ||
ACTIVE='timeout' | ||
break | ||
fi | ||
sleep 1 | ||
done | ||
is "$ACTIVE" "active" "Checking $srv status" | ||
done | ||
#!/usr/bin/perl | ||
|
||
use strict; | ||
use warnings; | ||
use Test::More; | ||
|
||
our @services = ('obsapisetup.service'); | ||
|
||
plan tests => 2 * scalar(@services); | ||
|
||
my $TIMEOUT = 300; | ||
|
||
for my $srv (@services) { | ||
my $enabled = `systemctl is-enabled $srv 2>/dev/null`; | ||
chomp($enabled); | ||
is($enabled, 'enabled', "Checking $srv enabled"); | ||
|
||
my $success = 'timeout'; | ||
my $tmp = $TIMEOUT; | ||
|
||
my ($legacy, $trash) = split /\./, $srv, 2; | ||
my $is_legacy = ( -f "/etc/init.d/$legacy") ? 1 : 0; | ||
|
||
while ($tmp > 0) { | ||
$tmp--; | ||
my $result; | ||
if ($is_legacy) { | ||
$result = `systemctl is-active $srv`; | ||
chomp $result; | ||
if ($result eq 'active') { | ||
$success=$result; | ||
last | ||
} | ||
} else { | ||
$result = `systemctl status $srv|grep "(code=exited, status=0/SUCCESS)"`; | ||
if ($result) { | ||
$success = 'active'; | ||
last | ||
} | ||
} | ||
print "."; | ||
sleep 1; | ||
} | ||
|
||
is($success, 'active', "Checking if $srv startup succeed"); | ||
} | ||
|
||
exit 0; |
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
Oops, something went wrong.