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

Scheduler: change /var/lock to /run/lock #1445

Open
wants to merge 28 commits into
base: release-1.14
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
678b417
Scheduler: change /var/lock to /run/lock
JoshVanL Aug 15, 2024
6654a5e
Update dapr in standalone tests to 1.14.1
JoshVanL Aug 15, 2024
0dea2d0
Update dapr in github workflow to 1.14.1
JoshVanL Aug 15, 2024
019e6a7
Adds scheduler upgrade and downgread tests
JoshVanL Aug 15, 2024
343d111
Adds back missing tests
JoshVanL Aug 15, 2024
c20e588
Fix comma in test code
JoshVanL Aug 15, 2024
c938c55
Fix string match
JoshVanL Aug 15, 2024
822190c
Fix string match in standalone e2e test
JoshVanL Aug 16, 2024
cff312d
Increase e2e timeout
JoshVanL Aug 16, 2024
dbd961d
Assert directory does not exist
JoshVanL Aug 16, 2024
553f522
Remove old upgrade test versions
JoshVanL Aug 16, 2024
4014bb3
increase timeout
JoshVanL Aug 16, 2024
e601f43
Adds container logs command for scheduler fail
JoshVanL Aug 16, 2024
f778633
Change data path based image variant
JoshVanL Aug 16, 2024
0281606
Increase 30m to 45m timeout in workflow
JoshVanL Aug 16, 2024
a168890
Remove another old test
JoshVanL Aug 16, 2024
fb41c2e
Remove testing container logs
JoshVanL Aug 16, 2024
bd413b1
Use correct names for RBAC resources
JoshVanL Aug 16, 2024
8353f3f
Adds dapr_scheduler log output
JoshVanL Aug 17, 2024
7742891
Read all logs
JoshVanL Aug 19, 2024
389f836
Only use var lock if in windows
JoshVanL Aug 19, 2024
4c26cb6
Linting
JoshVanL Aug 19, 2024
73a74d4
linting
JoshVanL Aug 19, 2024
3f79c26
Make lock path absolute
JoshVanL Aug 19, 2024
41b2a54
Remove runtime windows check for mariner
JoshVanL Aug 19, 2024
9910c5c
Fix image runtime version on suffix mariner
JoshVanL Aug 19, 2024
03d99b2
Print version..
JoshVanL Aug 19, 2024
fa652f9
Increase dapr dashboard to 0.14.0 in upgrade test
JoshVanL Aug 19, 2024
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
4 changes: 2 additions & 2 deletions .github/workflows/kind_e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ jobs:
name: E2E tests for K8s (KinD)
runs-on: ubuntu-latest
env:
DAPR_RUNTIME_PINNED_VERSION: 1.13.0-rc.2
DAPR_RUNTIME_PINNED_VERSION: 1.14.1
DAPR_DASHBOARD_PINNED_VERSION: 0.14.0
DAPR_RUNTIME_LATEST_STABLE_VERSION:
DAPR_DASHBOARD_LATEST_STABLE_VERSION:
DAPR_TGZ: dapr-1.13.0-rc.2.tgz
DAPR_TGZ: dapr-1.14.1.tgz
strategy:
fail-fast: false # Keep running if one leg fails.
matrix:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/self_hosted_e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
GOARCH: ${{ matrix.target_arch }}
GOPROXY: https://proxy.golang.org
ARCHIVE_OUTDIR: dist/archives
DAPR_RUNTIME_PINNED_VERSION: "1.13.0-rc.2"
DAPR_RUNTIME_PINNED_VERSION: "1.14.1"
DAPR_DASHBOARD_PINNED_VERSION: 0.14.0
DAPR_RUNTIME_LATEST_STABLE_VERSION: ""
DAPR_DASHBOARD_LATEST_STABLE_VERSION: ""
Expand Down
6 changes: 3 additions & 3 deletions pkg/standalone/standalone.go
Original file line number Diff line number Diff line change
Expand Up @@ -649,10 +649,10 @@ func runSchedulerService(wg *sync.WaitGroup, errorChan chan<- error, info initIn
// If that directory didn't exist in the container previously, then Docker sets
// the permissions owned by root and not writeable.
// We are lucky in that the Dapr containers have a world writeable directory at
// /var/lock and can therefore mount the Docker volume here.
// /run/lock and can therefore mount the Docker volume here.
// TODO: update the Dapr scheduler dockerfile to create a scheduler user id writeable
// directory at /var/lib/dapr/scheduler, then update the path here.
args = append(args, "--volume", *info.schedulerVolume+":/var/lock")
args = append(args, "--volume", *info.schedulerVolume+":/run/lock")
}

if info.dockerNetwork != "" {
Expand All @@ -673,7 +673,7 @@ func runSchedulerService(wg *sync.WaitGroup, errorChan chan<- error, info initIn
)
}

args = append(args, image, "--etcd-data-dir=/var/lock/dapr/scheduler")
args = append(args, image, "--etcd-data-dir=/run/lock/dapr/scheduler")

_, err = utils.RunCmdAndWait(runtimeCmd, args...)
if err != nil {
Expand Down
12 changes: 6 additions & 6 deletions tests/e2e/standalone/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,15 @@ func TestStandaloneInit(t *testing.T) {
placementPort = 6050
}

verifyTCPLocalhost(t, placementPort)
verifyTCPLocalhost(t, placementPort)
})

t.Run("init version with scheduler", func(t *testing.T) {
// Ensure a clean environment
must(t, cmdUninstall, "failed to uninstall Dapr")

args := []string{
"--runtime-version", "1.14.0-rc.3",
"--runtime-version", "1.14.1",
"--dev",
}
output, err := cmdInit(args...)
Expand All @@ -190,8 +190,8 @@ func TestStandaloneInit(t *testing.T) {
require.DirExists(t, daprPath, "Directory %s does not exist", daprPath)

_, latestDaprDashboardVersion := common.GetVersionsFromEnv(t, true)
verifyContainers(t, "1.14.0-rc.3")
verifyBinaries(t, daprPath, "1.14.0-rc.3", latestDaprDashboardVersion)
verifyContainers(t, "1.14.1")
verifyBinaries(t, daprPath, "1.14.1", latestDaprDashboardVersion)
verifyConfigs(t, daprPath)

placementPort := 50005
Expand All @@ -201,8 +201,8 @@ func TestStandaloneInit(t *testing.T) {
schedulerPort = 6060
}

verifyTCPLocalhost(t, placementPort)
verifyTCPLocalhost(t, schedulerPort)
verifyTCPLocalhost(t, placementPort)
verifyTCPLocalhost(t, schedulerPort)
})

t.Run("init without runtime-version flag with mariner images", func(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/standalone/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func TestStandaloneRun(t *testing.T) {
output, err := cmdRun(path, "--dapr-internal-grpc-port", "9999", "--", "bash", "-c", "echo test")
t.Log(output)
require.NoError(t, err, "run failed")
assert.Contains(t, output, "Internal gRPC server is running on port 9999")
assert.Contains(t, output, "Internal gRPC server is running on port :9999")
assert.Contains(t, output, "Exited App successfully")
assert.Contains(t, output, "Exited Dapr successfully")
assert.NotContains(t, output, "Could not update sidecar metadata for cliPID")
Expand Down
32 changes: 32 additions & 0 deletions tests/e2e/upgrade/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,38 @@ var supportedUpgradePaths = []upgradePath{
CustomResourceDefs: []string{"components.dapr.io", "configurations.dapr.io", "subscriptions.dapr.io", "resiliencies.dapr.io", "httpendpoints.dapr.io"},
},
},
{
previous: common.VersionDetails{
RuntimeVersion: "1.14.1",
DashboardVersion: "0.14.0",
ClusterRoles: []string{"dapr-dashboard", "dapr-injector", "dapr-operator-admin", "dapr-placement", "dapr-sentry", "dapr-scheduler"},
ClusterRoleBindings: []string{"dapr-operator-admin", "dapr-dashboard", "dapr-injector", "dapr-placement", "dapr-sentry", "dapr-scheduler"},
CustomResourceDefs: []string{"components.dapr.io", "configurations.dapr.io", "subscriptions.dapr.io", "resiliencies.dapr.io", "httpendpoints.dapr.io"},
},
next: common.VersionDetails{
RuntimeVersion: "1.13.0",
DashboardVersion: "0.14.0",
ClusterRoles: []string{"dapr-dashboard", "dapr-injector", "dapr-operator-admin", "dapr-placement", "dapr-sentry"},
ClusterRoleBindings: []string{"dapr-operator-admin", "dapr-dashboard", "dapr-injector", "dapr-placement", "dapr-sentry"},
CustomResourceDefs: []string{"components.dapr.io", "configurations.dapr.io", "subscriptions.dapr.io", "resiliencies.dapr.io", "httpendpoints.dapr.io"},
},
},
{
previous: common.VersionDetails{
RuntimeVersion: "1.13.0",
DashboardVersion: "0.14.0",
ClusterRoles: []string{"dapr-dashboard", "dapr-injector", "dapr-operator-admin", "dapr-placement", "dapr-sentry"},
ClusterRoleBindings: []string{"dapr-operator-admin", "dapr-dashboard", "dapr-injector", "dapr-placement", "dapr-sentry"},
CustomResourceDefs: []string{"components.dapr.io", "configurations.dapr.io", "subscriptions.dapr.io", "resiliencies.dapr.io", "httpendpoints.dapr.io"},
},
next: common.VersionDetails{
RuntimeVersion: "1.14.1",
DashboardVersion: "0.14.0",
ClusterRoles: []string{"dapr-dashboard", "dapr-injector", "dapr-operator-admin", "dapr-placement", "dapr-sentry", "dapr-scheduler"},
ClusterRoleBindings: []string{"dapr-operator-admin", "dapr-dashboard", "dapr-injector", "dapr-placement", "dapr-sentry", "dapr-scheduler"},
CustomResourceDefs: []string{"components.dapr.io", "configurations.dapr.io", "subscriptions.dapr.io", "resiliencies.dapr.io", "httpendpoints.dapr.io"},
},
},
}

func getTestsOnUpgrade(p upgradePath, installOpts, upgradeOpts common.TestOptions) []common.TestCase {
Expand Down
Loading