Make gpu map script return the normalized node names already.

This commit is contained in:
Joachim Meyer 2023-06-29 10:01:19 +02:00
parent 7a0c41e378
commit e70d377047
2 changed files with 6 additions and 3 deletions

View File

@ -43,5 +43,5 @@ if __name__ == "__main__":
machines = fetch_condor_machines() machines = fetch_condor_machines()
mappings = {} mappings = {}
for machine in machines: for machine in machines:
mappings[machine] = mapping_for_machine(machine) mappings[machine.split(".")[0]] = mapping_for_machine(machine)
print(json.dumps(mappings)) print(json.dumps(mappings))

View File

@ -46,6 +46,8 @@ static const std::unordered_map<int, std::string> jobStateMap = {
void CCSyncPlugin::earlyInitialize() { void CCSyncPlugin::earlyInitialize() {
lock_guard<std::mutex> guard(data_mutex); lock_guard<std::mutex> guard(data_mutex);
dprintf(D_ALWAYS, "Early initializing CCSync plugin.\n");
param(url, "CCSYNC_URL"); param(url, "CCSYNC_URL");
if (url.empty()) if (url.empty())
dprintf(D_ALWAYS, "WARNING: missing CCSYNC_URL in local config!\n"); dprintf(D_ALWAYS, "WARNING: missing CCSYNC_URL in local config!\n");
@ -86,7 +88,7 @@ void CCSyncPlugin::earlyInitialize() {
void CCSyncPlugin::initialize() { void CCSyncPlugin::initialize() {
lock_guard<std::mutex> guard(data_mutex); lock_guard<std::mutex> guard(data_mutex);
// dprintf(D_ALWAYS, "Initializing TCP Forwarding plugin.\n"); dprintf(D_ALWAYS, "Initializing CCSync plugin.\n");
initializing = false; initializing = false;
} }
@ -205,7 +207,8 @@ void CCSyncPlugin::setAttribute(const char *key, const char *_name,
// dprintf(D_FULLDEBUG,"Assigning attribute to JobId %d.%d\n", clusterId, // dprintf(D_FULLDEBUG,"Assigning attribute to JobId %d.%d\n", clusterId,
// procId); // procId);
currentStatus[clusterId][procId][name] = value; currentStatus[clusterId][procId][name] = value;
// dprintf(D_FULLDEBUG, "[%d.%d] %s: %s\n", clusterId, procId, name.c_str(), // dprintf(D_FULLDEBUG, "[%d.%d] %s: %s\n", clusterId, procId,
// name.c_str(),
// value.c_str()); // value.c_str());
if (!initializing) { // HTCondor bug? We should'n be receiving events if (!initializing) { // HTCondor bug? We should'n be receiving events
// before initialization is done. We will ignore them // before initialization is done. We will ignore them