-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[YUNIKORN-2498] Implement force create flag for recovery queue (#807)
To place already running allocations on startup the core supports a force create flag for an application. The flag wil place the application into the recovery queue if all other placements fail. The shim sets the flag in the metadata if the pod has a nodename set when the metadata is created. Closes: #807 Signed-off-by: Wilfred Spiegelenburg <[email protected]>
- Loading branch information
Showing
6 changed files
with
330 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
test/e2e/restart_changed_config/restart_changed_config_suite_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package restartchangedconfig_test | ||
|
||
import ( | ||
"path/filepath" | ||
"testing" | ||
|
||
"github.com/onsi/ginkgo/v2" | ||
"github.com/onsi/ginkgo/v2/reporters" | ||
"github.com/onsi/gomega" | ||
|
||
"github.com/apache/yunikorn-k8shim/test/e2e/framework/configmanager" | ||
) | ||
|
||
func init() { | ||
configmanager.YuniKornTestConfig.ParseFlags() | ||
} | ||
|
||
func TestRestartChangedConfig(t *testing.T) { | ||
ginkgo.ReportAfterSuite("TestRestartChangedConfig", func(report ginkgo.Report) { | ||
err := reporters.GenerateJUnitReportWithConfig( | ||
report, | ||
filepath.Join(configmanager.YuniKornTestConfig.LogDir, "TEST-restartchangedconfig_junit.xml"), | ||
reporters.JunitReportConfig{OmitSpecLabels: true}, | ||
) | ||
Ω(err).NotTo(HaveOccurred()) | ||
}) | ||
gomega.RegisterFailHandler(ginkgo.Fail) | ||
ginkgo.RunSpecs(t, "TestRestartChangedConfig", ginkgo.Label("TestRestartChangedConfig")) | ||
} | ||
|
||
var Ω = gomega.Ω | ||
var HaveOccurred = gomega.HaveOccurred |
Oops, something went wrong.