Skip to content

Commit

Permalink
Update placeholder branch for containerized_rqd (#1550)
Browse files Browse the repository at this point in the history
Signed-off-by: Diego Tavares <[email protected]>
  • Loading branch information
DiegoTavares authored Oct 18, 2024
1 parent 4e365d4 commit b117568
Show file tree
Hide file tree
Showing 17 changed files with 440 additions and 349 deletions.
3 changes: 3 additions & 0 deletions cuebot/src/main/java/com/imageworks/spcue/DispatchFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,8 @@ public class DispatchFrame extends FrameEntity implements FrameInterface {

// A comma separated list of services
public String services;

// The Operational System this frame is expected to run in
public String os;
}

10 changes: 9 additions & 1 deletion cuebot/src/main/java/com/imageworks/spcue/DispatchHost.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class DispatchHost extends Entity
public long gpuMemory;
public long idleGpuMemory;
public String tags;
public String os;
private String os;

public boolean isNimby;
public boolean isLocalDispatch = false;
Expand Down Expand Up @@ -81,6 +81,14 @@ public String getFacilityId() {
return facilityId;
}

public String[] getOs() {
return this.os.split(",");
}

public void setOs(String os) {
this.os = os;
}

public boolean canHandleNegativeCoresRequest(int requestedCores) {
// Request is positive, no need to test further.
if (requestedCores > 0) {
Expand Down
10 changes: 6 additions & 4 deletions cuebot/src/main/java/com/imageworks/spcue/VirtualProc.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ public String getName() {
* @param frame
* @return
*/
public static final VirtualProc build(DispatchHost host, DispatchFrame frame, String... selfishServices) {
public static final VirtualProc build(DispatchHost host,
DispatchFrame frame,
String... selfishServices) {
VirtualProc proc = new VirtualProc();
proc.allocationId = host.getAllocationId();
proc.hostId = host.getHostId();
Expand All @@ -94,7 +96,7 @@ public static final VirtualProc build(DispatchHost host, DispatchFrame frame, St
proc.jobId = frame.getJobId();
proc.showId = frame.getShowId();
proc.facilityId = frame.getFacilityId();
proc.os = host.os;
proc.os = frame.os;

proc.hostName = host.getName();
proc.unbooked = false;
Expand Down Expand Up @@ -148,7 +150,7 @@ else if (proc.coresReserved >= 100) {
proc.coresReserved = wholeCores * 100;
} else {
if (frame.threadable) {
if (selfishServices != null &&
if (selfishServices != null &&
frame.services != null &&
containsSelfishService(frame.services.split(","), selfishServices)){
proc.coresReserved = wholeCores * 100;
Expand Down Expand Up @@ -238,7 +240,7 @@ public static final VirtualProc build(DispatchHost host,
proc.jobId = frame.getJobId();
proc.showId = frame.getShowId();
proc.facilityId = frame.getFacilityId();
proc.os = host.os;
proc.os = frame.os;

proc.hostName = host.getName();
proc.unbooked = false;
Expand Down
Loading

0 comments on commit b117568

Please sign in to comment.