forked from lix-project/hydra
hydra: buildmachine disabled by default, add some default constraints
This commit is contained in:
parent
ef1efa80e4
commit
a391c78aaf
|
@ -146,7 +146,7 @@ sub create_machine_submit : Chained('admin') PathPart('create-machine/submit') A
|
||||||
|
|
||||||
requireAdmin($c);
|
requireAdmin($c);
|
||||||
|
|
||||||
my $hostname = trim $c->request->params->{"hostname"};
|
my $hostname = trim $c->request->params->{"hostname"};
|
||||||
error($c, "Invalid or empty hostname.") if $hostname eq "";
|
error($c, "Invalid or empty hostname.") if $hostname eq "";
|
||||||
|
|
||||||
txn_do($c->model('DB')->schema, sub {
|
txn_do($c->model('DB')->schema, sub {
|
||||||
|
@ -154,6 +154,7 @@ sub create_machine_submit : Chained('admin') PathPart('create-machine/submit') A
|
||||||
{ hostname => $hostname });
|
{ hostname => $hostname });
|
||||||
updateMachine($c, $machine);
|
updateMachine($c, $machine);
|
||||||
});
|
});
|
||||||
|
saveNixMachines($c);
|
||||||
$c->res->redirect("/admin/machines");
|
$c->res->redirect("/admin/machines");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -487,12 +487,12 @@ create table NewsItems (
|
||||||
|
|
||||||
create table BuildMachines (
|
create table BuildMachines (
|
||||||
hostname text primary key NOT NULL,
|
hostname text primary key NOT NULL,
|
||||||
username text NOT NULL,
|
username text DEFAULT '' NOT NULL,
|
||||||
ssh_key text NOT NULL,
|
ssh_key text DEFAULT '' NOT NULL,
|
||||||
options text NOT NULL,
|
options text DEFAULT '' NOT NULL,
|
||||||
maxconcurrent integer DEFAULT 2 NOT NULL,
|
maxconcurrent integer DEFAULT 2 NOT NULL,
|
||||||
speedfactor integer DEFAULT 1 NOT NULL,
|
speedfactor integer DEFAULT 1 NOT NULL,
|
||||||
enabled integer DEFAULT 1 NOT NULL
|
enabled integer DEFAULT 0 NOT NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
create table BuildMachineSystemTypes (
|
create table BuildMachineSystemTypes (
|
||||||
|
|
Loading…
Reference in a new issue