refactor!: rename module and move CLI to cmd/cephmig
Use the repository path git.zb-server.de/Sebi/CephfsMig as module path instead of the non-importable name CephMig, and move the cephmig entry point from the repository root to cmd/cephmig next to cmd/nativeprobe. Makefile and Dockerfile.native build the new path. BREAKING CHANGE: import paths change from CephMig/... to git.zb-server.de/Sebi/CephfsMig/..., and the binary is now built from ./cmd/cephmig instead of the module root. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7705ed3eaf
commit
8fe60a4f8f
14 files changed
+16
-16
No files matched your search
@@ -1,13 +1,13 @@
|
||||
.PHONY: build check doctor dev-config dev-up dev-down dev-status dev-smoke dev-shell dev-restart-check dev-migration-test dev-native-build dev-native-test dev-smallfiles-test dev-million-start dev-million-status dev-million-finish
|
||||
build:
|
||||
go build -buildvcs=false -o bin/cephmig .
|
||||
go build -buildvcs=false -o bin/cephmig ./cmd/cephmig
|
||||
check:
|
||||
go vet ./...
|
||||
go test ./...
|
||||
bash -n dev/cluster.sh dev/client.sh dev/smoke.sh dev/restart-check.sh dev/migration-test.sh dev/native-test.sh dev/smallfiles-test.sh dev/million-start.sh dev/million-finish.sh
|
||||
python3 -c 'import ast,pathlib; [ast.parse(pathlib.Path(p).read_text()) for p in ("dev/native-fixture.py", "dev/smallfiles.py", "dev/million.py")]'
|
||||
doctor:
|
||||
go run . doctor
|
||||
go run ./cmd/cephmig doctor
|
||||
dev-config:
|
||||
docker compose -f dev/compose.yaml config --quiet
|
||||
dev-up:
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"CephMig/internal/migration"
|
||||
"git.zb-server.de/Sebi/CephfsMig/internal/migration"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
func TestCLIRejectsFinalizationWithoutWriterStop(t *testing.T) {
|
||||
var out, log bytes.Buffer
|
||||
err := run(context.Background(), []string{"finalize", "--config", "dev/migration.example.json", "--state", "/tmp/unused-state"}, &out, &log)
|
||||
err := run(context.Background(), []string{"finalize", "--config", "../../dev/migration.example.json", "--state", "/tmp/unused-state"}, &out, &log)
|
||||
if err == nil || !strings.Contains(err.Error(), "--writers-stopped") {
|
||||
t.Fatalf("got %v", err)
|
||||
}
|
||||
@@ -3,11 +3,11 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"CephMig/internal/cephfsnative"
|
||||
"CephMig/internal/storage"
|
||||
"encoding/json"
|
||||
"flag"
|
||||
"fmt"
|
||||
"git.zb-server.de/Sebi/CephfsMig/internal/cephfsnative"
|
||||
"git.zb-server.de/Sebi/CephfsMig/internal/storage"
|
||||
"io"
|
||||
"os"
|
||||
)
|
||||
|
||||
@@ -13,7 +13,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
|
||||
CGO_ENABLED=1 go test -race -tags ceph ./... \
|
||||
&& CGO_ENABLED=1 go vet -tags ceph ./... \
|
||||
&& CGO_ENABLED=1 go build -buildvcs=false -tags ceph -o /out/native-probe ./cmd/nativeprobe \
|
||||
&& CGO_ENABLED=1 go build -buildvcs=false -tags ceph -o /out/cephmig-native .
|
||||
&& CGO_ENABLED=1 go build -buildvcs=false -tags ceph -o /out/cephmig-native ./cmd/cephmig
|
||||
|
||||
FROM ${CEPH_IMAGE}
|
||||
COPY --from=build /out/ /usr/local/bin/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module CephMig
|
||||
module git.zb-server.de/Sebi/CephfsMig
|
||||
|
||||
go 1.25.0
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ import (
|
||||
"time"
|
||||
"unsafe"
|
||||
|
||||
"CephMig/internal/storage"
|
||||
"git.zb-server.de/Sebi/CephfsMig/internal/storage"
|
||||
)
|
||||
|
||||
type Client struct{ mount *C.struct_ceph_mount_info }
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
"strings"
|
||||
"syscall"
|
||||
|
||||
"CephMig/internal/storage"
|
||||
"git.zb-server.de/Sebi/CephfsMig/internal/storage"
|
||||
)
|
||||
|
||||
type nativeAccess struct{ backend *nativeTransport }
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"CephMig/internal/storage"
|
||||
"git.zb-server.de/Sebi/CephfsMig/internal/storage"
|
||||
)
|
||||
|
||||
func readNativeAt(f storage.File, b []byte, offset int64) error {
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"context"
|
||||
"io"
|
||||
|
||||
"CephMig/internal/cephfsnative"
|
||||
"git.zb-server.de/Sebi/CephfsMig/internal/cephfsnative"
|
||||
)
|
||||
|
||||
func openNativeEngine(ctx context.Context, c Config, x Executor, log io.Writer) (Engine, io.Closer, error) {
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"strings"
|
||||
"syscall"
|
||||
|
||||
"CephMig/internal/storage"
|
||||
"git.zb-server.de/Sebi/CephfsMig/internal/storage"
|
||||
)
|
||||
|
||||
func walkNative(ctx context.Context, fs storage.FS, root string, visit func(string, storage.Node, int) error) error {
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"CephMig/internal/storage"
|
||||
"git.zb-server.de/Sebi/CephfsMig/internal/storage"
|
||||
)
|
||||
|
||||
type inventorySourceFS struct {
|
||||
|
||||
@@ -11,7 +11,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"CephMig/internal/storage"
|
||||
"git.zb-server.de/Sebi/CephfsMig/internal/storage"
|
||||
)
|
||||
|
||||
type emptyNativeDiff struct{}
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"CephMig/internal/storage"
|
||||
"git.zb-server.de/Sebi/CephfsMig/internal/storage"
|
||||
)
|
||||
|
||||
const nativeChunk = 4 << 20
|
||||
|
||||
Reference in new issue
Block a user