Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.1.5 #205

Merged
merged 7 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# These ARGs must be before the first FROM. This allows them to be valid for
# use in FROM instructions.
ARG NNFMFU_TAG_BASE=ghcr.io/nearnodeflash/nnf-mfu
ARG NNFMFU_VERSION=0.1.1
ARG NNFMFU_VERSION=0.1.2

# Build the manager binary
FROM golang:1.21-alpine AS builder
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ IMAGE_TAG_BASE ?= ghcr.io/nearnodeflash/nnf-dm

# The NNF-MFU container image to use in NNFContainerProfile resources.
NNFMFU_TAG_BASE ?= ghcr.io/nearnodeflash/nnf-mfu
NNFMFU_VERSION ?= 0.1.1
NNFMFU_VERSION ?= 0.1.2

CONTAINER_BUILDARGS=--build-arg NNFMFU_TAG_BASE=$(NNFMFU_TAG_BASE) --build-arg NNFMFU_VERSION=$(NNFMFU_VERSION)

Expand Down
24 changes: 23 additions & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ package main
import (
"flag"
"os"
"strconv"

// Import all Kubernetes client auth plugins (e.g. Azure, GCP, OIDC, etc.)
// to ensure that exec-entrypoint and run can make use of them.
Expand Down Expand Up @@ -92,7 +93,28 @@ func main() {

dmCtrl.SetOptions(&options)

mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), options)
config := ctrl.GetConfigOrDie()
qpsString, found := os.LookupEnv("NNF_REST_CONFIG_QPS")
if found {
qps, err := strconv.ParseFloat(qpsString, 32)
if err != nil {
setupLog.Error(err, "invalid value for NNF_REST_CONFIG_QPS")
os.Exit(1)
}
config.QPS = float32(qps)
}

burstString, found := os.LookupEnv("NNF_REST_CONFIG_BURST")
if found {
burst, err := strconv.Atoi(burstString)
if err != nil {
setupLog.Error(err, "invalid value for NNF_REST_CONFIG_BURST")
os.Exit(1)
}
config.Burst = burst
}

mgr, err := ctrl.NewManager(config, options)
if err != nil {
setupLog.Error(err, "unable to start manager")
os.Exit(1)
Expand Down
6 changes: 2 additions & 4 deletions config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: controller
newName: ghcr.io/nearnodeflash/nnf-dm
newTag: 0.1.4
newTag: 0.1.5
- name: nnf-mfu
newName: ghcr.io/nearnodeflash/nnf-mfu
newTag: 0.1.1
newTag: 0.1.2
6 changes: 5 additions & 1 deletion daemons/compute/api/datamovement.proto
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ message DataMovementCreateRequest {
// Extra options to pass to `dcp` if present in the Data Movement command.
string dcpOptions = 5;

// If true, enable server-side logging of stdout when the command is successful. Failures output is always logged.
// If true, enable server-side logging of stdout when the command is successful. Failure output is always logged.
bool logStdout = 6;

// If true, store stdout in DataMovementStatusResponse.Message when the command is successful. Failure output is always contained in the message.
Expand All @@ -120,6 +120,10 @@ message DataMovementCreateRequest {
// server otherwise the data movement operation will be invalid. Empty will default to the
// default profile.
string profile = 10;

// Extra options to pass to `mpirun` if present in the Data Movement command.
string mpirunOptions = 11;

}

// The Data Movement Create Response to indicate the status of of the Data Movement Request.
Expand Down
322 changes: 167 additions & 155 deletions daemons/compute/client-go/api/datamovement.pb.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion daemons/compute/client-go/api/datamovement_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 13 additions & 11 deletions daemons/compute/client-go/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ func main() {
maxWaitTime := flag.Int64("max-wait-time", 0, "maximum time to wait for status completion, in seconds.")
count := flag.Int("count", 1, "number of requests to create")
cancelExpiryTime := flag.Duration("cancel", -time.Second, "duration after create to cancel request")
mpirunOptions := flag.String("mpirun-options", "", "extra options to provide to mpirun")
dcpOptions := flag.String("dcp-options", "", "extra options to provide to dcp")
logStdout := flag.Bool("log-stdout", false, "enable server-side logging of stdout on successful dm")
storeStdout := flag.Bool("store-stdout", false, "store stdout in status message on successful dm")
Expand Down Expand Up @@ -102,7 +103,7 @@ func main() {

log.Printf("Creating request %d of %d...", i+1, *count)
createResponse, err := createRequest(ctx, c, *workflow, *namespace,
*source, *destination, *dryrun, *dcpOptions,
*source, *destination, *dryrun, *mpirunOptions, *dcpOptions,
*logStdout, *storeStdout, *slots, *maxSlots,
*profile)
if err != nil {
Expand Down Expand Up @@ -220,23 +221,24 @@ func versionRequest(ctx context.Context, client pb.DataMoverClient) (*pb.DataMov
}

func createRequest(ctx context.Context, client pb.DataMoverClient, workflow, namespace,
source, destination string, dryrun bool, dcpOptions string, logStdout, storeStdout bool,
source, destination string, dryrun bool, mpirunOptions, dcpOptions string, logStdout, storeStdout bool,
slots, maxSlots int, profile string) (*pb.DataMovementCreateResponse, error) {

rsp, err := client.Create(ctx, &pb.DataMovementCreateRequest{
Workflow: &pb.DataMovementWorkflow{
Name: workflow,
Namespace: namespace,
},
Source: source,
Destination: destination,
Dryrun: dryrun,
DcpOptions: dcpOptions,
LogStdout: logStdout,
StoreStdout: storeStdout,
Slots: int32(slots),
MaxSlots: int32(maxSlots),
Profile: profile,
Source: source,
Destination: destination,
Dryrun: dryrun,
MpirunOptions: mpirunOptions,
DcpOptions: dcpOptions,
LogStdout: logStdout,
StoreStdout: storeStdout,
Slots: int32(slots),
MaxSlots: int32(maxSlots),
Profile: profile,
})

if err != nil {
Expand Down
64 changes: 32 additions & 32 deletions daemons/compute/client-py/datamovement_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion daemons/compute/copy-offload-api.html
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ <h3 id="datamovement.DataMovementCreateRequest">DataMovementCreateRequest</h3>
<td>logStdout</td>
<td><a href="#bool">bool</a></td>
<td></td>
<td><p>If true, enable server-side logging of stdout when the command is successful. Failures output is always logged. </p></td>
<td><p>If true, enable server-side logging of stdout when the command is successful. Failure output is always logged. </p></td>
</tr>

<tr>
Expand Down Expand Up @@ -471,6 +471,13 @@ <h3 id="datamovement.DataMovementCreateRequest">DataMovementCreateRequest</h3>
default profile. </p></td>
</tr>

<tr>
<td>mpirunOptions</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p>Extra options to pass to `mpirun` if present in the Data Movement command. </p></td>
</tr>

</tbody>
</table>

Expand Down
Loading
Loading