Commit f09bd97a authored by AdamSimpson's avatar AdamSimpson
Browse files
parents f5717825 01193a76
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ void BuilderQueue::tick(asio::yield_context yield) {

    // Delete reservations that are completed and don't have an active builder associated with them
    reservations.remove_if([](const auto &reservation) {
        return reservation.complete() && !reservation.builder;
        return (reservation.complete() && !reservation.builder);
    });

    // Available_builders = all_builders - unavailable_builders
@@ -53,7 +53,6 @@ void BuilderQueue::tick(asio::yield_context yield) {
    int open_slots = max_builders - all_builders.size() - pending_requests;
    int open_available_slots = max_available_builders - available_builders.size() - pending_requests;
    int request_count = std::min(open_slots, open_available_slots);
    logger::write("Requesting " + std::to_string(request_count) + " builders");
    for (int i=0; i < request_count; i++) {
        pending_requests++;
        asio::spawn(io_service,
+6 −6
Original line number Diff line number Diff line
@@ -3,6 +3,12 @@
set -e
set -o xtrace

# Disable TCP time stamps - ORNL seems to be jacking them up and causing the connection to drop at the 5 minute mark
echo 0 > /proc/sys/net/ipv4/tcp_timestamps # this session
cat << EOF > /etc/sysctl.d/51-net.conf     # permanent
net.ipv4.tcp_timestamps = 0
EOF

# Create non root builder user
useradd --create-home --home-dir /home/builder --shell /bin/bash builder

@@ -71,12 +77,6 @@ WantedBy=multi-user.target
EOF
systemctl enable ContainerBuilder

# Disable TCP time stamps - ORNL seems to be jacking them up and causing the connection to drop at the 5 minute mark
cat << EOF > /etc/sysctl.d/51-net.conf
net.ipv4.tcp_timestamps = 0
EOF


reboot

# To check that the Builder service is running
+5 −0
Original line number Diff line number Diff line
@@ -3,6 +3,11 @@
set -e
set -o xtrace

echo 0 > /proc/sys/net/ipv4/tcp_timestamps # this session
cat << EOF > /etc/sysctl.d/51-net.conf     # permanent
net.ipv4.tcp_timestamps = 0
EOF

# Create non root queue user
useradd --create-home --home-dir /home/queue --shell /bin/bash queue