Clean prepaid SoT, identity mailbox, public access planes, leaf policy, fleet spawn
Some checks are pending
offline / test (push) Waiting to run
Some checks are pending
offline / test (push) Waiting to run
Persist account-balance books; edge caches prepaid from books. Add zappier-identity, verae-nats-accounts, verae-jobs-events, verae-access-staff, zapier-decisions. Edge binds loopback; lan-134 stays off; HTTP services prefer local spawn.
This commit is contained in:
parent
345aeeead9
commit
ddf772454b
153 changed files with 2236 additions and 116 deletions
|
|
@ -41,7 +41,11 @@ export function loadMachines(root, overlayPath) {
|
|||
if (extra && typeof extra === 'object') Object.assign(m, extra);
|
||||
}
|
||||
}
|
||||
return list.map(normalizeMachine);
|
||||
return list.map((m) => {
|
||||
const n = normalizeMachine(m);
|
||||
if (n.id === 'lan-134' && process.env.FLEET_ENABLE_LAN134 !== '1') n.enabled = false;
|
||||
return n;
|
||||
});
|
||||
}
|
||||
|
||||
export function normalizeMachine(m) {
|
||||
|
|
@ -86,9 +90,13 @@ export function canHost(machine, serviceId, role) {
|
|||
* @param {string} serviceId
|
||||
* @param {string} [role]
|
||||
*/
|
||||
export function pickMachine(machines, instances, serviceId, role, exclude = []) {
|
||||
export function pickMachine(machines, instances, serviceId, role, exclude = [], opts = {}) {
|
||||
const skip = new Set(exclude);
|
||||
const eligible = machines.filter((m) => canHost(m, serviceId, role) && !skip.has(m.id));
|
||||
let eligible = machines.filter((m) => canHost(m, serviceId, role) && !skip.has(m.id));
|
||||
if (opts.preferLocal) {
|
||||
const local = eligible.filter((m) => m.kind === 'local');
|
||||
if (local.length) eligible = local;
|
||||
}
|
||||
if (!eligible.length) return null;
|
||||
const scored = eligible.map((m) => {
|
||||
const running = instances.filter((i) => i.machine === m.id && i.pid).length;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue