-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The repository was moved to a separate organization strings.ReplaceAll only work in go1.12, not go1.10 Need to create conmon/config.h without tags and git The configuration _needs_ to be updated (yet again)
- Loading branch information
1 parent
37f3a64
commit 85adbd7
Showing
4 changed files
with
56 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
|
||
#if !defined(CONFIG_H) | ||
#define CONFIG_H | ||
|
||
#define BUF_SIZE 8192 | ||
#define STDIO_BUF_SIZE 8192 | ||
#define DEFAULT_SOCKET_PATH "/var/run/crio" | ||
|
||
#endif // CONFIG_H |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
diff --git a/Makefile b/Makefile | ||
index de79f63..a9ea13b 100644 | ||
--- a/Makefile | ||
+++ b/Makefile | ||
@@ -136,7 +136,7 @@ crio.conf: bin/crio | ||
release-note: ${RELEASE_TOOL} | ||
${RELEASE_TOOL} -n $(release) | ||
|
||
-conmon/config.h: git-vars cmd/crio-config/config.go oci/oci.go | ||
+conmon/config.h: cmd/crio-config/config.go oci/oci.go | ||
$(GO) build $(LDFLAGS) -tags "$(BUILDTAGS)" -o bin/crio-config $(PROJECT)/cmd/crio-config | ||
( cd conmon && $(CURDIR)/bin/crio-config ) | ||
|
||
diff --git a/cmd/crio/main.go b/cmd/crio/main.go | ||
index 0bc347a..ab9969f 100644 | ||
--- a/cmd/crio/main.go | ||
+++ b/cmd/crio/main.go | ||
@@ -207,7 +207,7 @@ func mergeConfig(config *server.Config, ctx *cli.Context) (string, error) { | ||
} | ||
|
||
func writeCrioGoroutineStacks() { | ||
- path := filepath.Join("/tmp", fmt.Sprintf("crio-goroutine-stacks-%s.log", strings.ReplaceAll(time.Now().Format(time.RFC3339), ":", ""))) | ||
+ path := filepath.Join("/tmp", fmt.Sprintf("crio-goroutine-stacks-%s.log", strings.Replace(time.Now().Format(time.RFC3339), ":", "", -1))) | ||
if err := utils.WriteGoroutineStacksToFile(path); err != nil { | ||
logrus.Warnf("Failed to write goroutine stacks: %s", err) | ||
} | ||
diff --git a/oci/runtime_vm.go b/oci/runtime_vm.go | ||
index 57a1fde..64f853f 100644 | ||
--- a/oci/runtime_vm.go | ||
+++ b/oci/runtime_vm.go | ||
@@ -172,7 +172,7 @@ func (r *runtimeVM) startRuntimeDaemon(c *Container) error { | ||
args = append(args, "start") | ||
|
||
// Modify the runtime path so that it complies with v2 shim API | ||
- newRuntimePath := strings.ReplaceAll(r.path, "-", ".") | ||
+ newRuntimePath := strings.Replace(r.path, "-", ".", -1) | ||
|
||
// Setup default namespace | ||
r.ctx = namespaces.WithNamespace(r.ctx, namespaces.Default) |