Skip to content

Commit f0aef34

Browse files
Merge pull request cri-o#3554 from umohnani8/conf
Move crio defaults back to /etc/crio/crio.conf
2 parents 8ecb63a + 7f4ac3b commit f0aef34

File tree

6 files changed

+18
-26
lines changed

6 files changed

+18
-26
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ jobs:
183183
name: Show CRI-O version
184184
command: ./bin/crio version
185185
- run:
186-
command: make crio.conf.d
186+
command: make crio.conf
187187
- run:
188188
command: make docs -j $JOBS
189189
- save_cache:
@@ -195,7 +195,7 @@ jobs:
195195
root: .
196196
paths:
197197
- bin
198-
- build/crio.conf.d/00-default.conf
198+
- crio.conf
199199
- docs
200200

201201
build-static:

Makefile

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ JUNIT_PATH := ${BUILD_PATH}/junit
3434
TESTBIN_PATH := ${BUILD_PATH}/test
3535
MOCK_PATH := ${PWD}/test/mocks
3636

37-
CRIO_CONFD_DIR := crio.conf.d
38-
CRIO_CONFIG_DEFAULT := 00-default.conf
39-
BUILD_CONFIG_PATH := ${BUILD_PATH}/${CRIO_CONFD_DIR}/${CRIO_CONFIG_DEFAULT}
40-
4137
BASHINSTALLDIR=${PREFIX}/share/bash-completion/completions
4238
FISHINSTALLDIR=${PREFIX}/share/fish/completions
4339
ZSHINSTALLDIR=${PREFIX}/share/zsh/site-functions
@@ -114,9 +110,7 @@ TESTIMAGE_NAME ?= $(shell $(TESTIMAGE_SCRIPT) -d)
114110

115111
TESTIMAGE_NIX ?= $(TESTIMAGE_REGISTRY)/nix:1.3.0
116112

117-
all: binaries config docs
118-
119-
config: ${BUILD_CONFIG_PATH}
113+
all: binaries crio.conf docs
120114

121115
default: help
122116

@@ -171,13 +165,10 @@ build-static:
171165
mkdir -p cri-o/bin && \
172166
cp result-bin/bin/crio-* cri-o/bin"
173167

174-
release-bundle: clean bin/pinns build-static docs config bundle
175-
176-
${CRIO_CONFD_DIR}: ${BUILD_CONFIG_PATH}
168+
release-bundle: clean bin/pinns build-static docs crio.conf bundle
177169

178-
${BUILD_CONFIG_PATH}: bin/crio
179-
mkdir -p $(dir ${BUILD_CONFIG_PATH})
180-
./bin/crio -d "" --config="" $(CONF_OVERRIDES) config > ${BUILD_CONFIG_PATH}
170+
crio.conf: bin/crio
171+
./bin/crio -d "" --config="" $(CONF_OVERRIDES) config > crio.conf
181172

182173
release-note: ${RELEASE_TOOL}
183174
${RELEASE_TOOL} -n $(release)
@@ -435,9 +426,10 @@ install.man: $(MANPAGES)
435426
install ${SELINUXOPT} -m 644 $(filter %.5,$(MANPAGES)) -t $(MANDIR)/man5
436427
install ${SELINUXOPT} -m 644 $(filter %.8,$(MANPAGES)) -t $(MANDIR)/man8
437428

438-
install.config: ${BUILD_CONFIG_PATH}
429+
install.config: crio.conf
439430
install ${SELINUXOPT} -d $(DATAROOTDIR)/oci/hooks.d
440-
install ${SELINUXOPT} -D -m 644 $(BUILD_CONFIG_PATH) $(ETCDIR_CRIO)/$(CRIO_CONFD_DIR)/$(CRIO_CONFIG_DEFAULT)
431+
install ${SELINUXOPT} -d $(ETCDIR_CRIO)/crio.conf.d
432+
install ${SELINUXOPT} -D -m 644 crio.conf $(ETCDIR_CRIO)/crio.conf
441433
install ${SELINUXOPT} -D -m 644 crio-umount.conf $(OCIUMOUNTINSTALLDIR)/crio-umount.conf
442434
install ${SELINUXOPT} -D -m 644 crictl.yaml $(CRICTL_CONFIG_DIR)
443435

@@ -480,6 +472,7 @@ uninstall:
480472
rm -f $(PREFIX)/lib/systemd/system/cri-o.service
481473
rm -rf $(DATAROOTDIR)/oci/hooks.d
482474
rm -f $(ETCDIR_CRIO)/crio.conf
475+
rm -rf $(ETCDIR_CRIO)/crio.conf.d
483476
rm -f $(OCIUMOUNTINSTALLDIR)/crio-umount.conf
484477
rm -f $(CRICTL_CONFIG_DIR)/crictl.yaml
485478

@@ -495,7 +488,6 @@ release-branch-forward:
495488
$(GO_RUN) ./scripts/release-branch-forward
496489

497490
.PHONY: \
498-
${CRIO_CONFD_DIR} \
499491
.explicit_phony \
500492
git-validation \
501493
binaries \

contrib/bundle/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ install-crio:
4848
ln -sf $(BINDIR)/crio-static $(BINDIR)/crio
4949
install $(SELINUX) -D -m 644 -t $(ETCDIR) etc/crictl.yaml
5050
install $(SELINUX) -D -m 644 -t $(OCIDIR) etc/crio-umount.conf
51-
install $(SELINUX) -D -m 644 -t $(ETCDIR)/crio/crio.conf.d etc/00-default.conf
51+
install $(SELINUX) -D -m 644 -t $(ETCDIR)/crio etc/crio.conf
5252
install $(SELINUX) -D -m 644 -t $(MANDIR)/man5 man/crio.conf.5
5353
install $(SELINUX) -D -m 644 -t $(MANDIR)/man5 man/crio.conf.d.5
5454
install $(SELINUX) -D -m 644 -t $(MANDIR)/man8 man/crio.8
@@ -97,7 +97,7 @@ uninstall-crio:
9797
rm $(BINDIR)/crio-static
9898
rm $(ETCDIR)/crictl.yaml
9999
rm $(OCIDIR)/crio-umount.conf
100-
rm $(ETCDIR)/crio/crio.conf.d/00-default.conf
100+
rm $(ETCDIR)/crio/crio.conf
101101
rm $(MANDIR)/man5/crio.conf.5
102102
rm $(MANDIR)/man5/crio.conf.d.5
103103
rm $(MANDIR)/man8/crio.8

contrib/bundle/build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ FILES_MAN=(
2424
FILES_ETC=(
2525
"$GIT_ROOT/crictl.yaml"
2626
"$GIT_ROOT/crio-umount.conf"
27-
"$GIT_ROOT/build/crio.conf.d/00-default.conf"
27+
"$GIT_ROOT/crio.conf"
2828
)
2929
FILES_CONTRIB=(
3030
"$GIT_ROOT/contrib/cni/10-crio-bridge.conf"

contrib/test/integration/e2e-base.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# only fixup paths for e2e tests which expect to be able to pass 'test-handler' as the runtime handler
33
- name: add test-handler runtime handler for Runtimes test
44
blockinfile:
5-
path: /etc/crio/crio.conf.d/00-default.conf
5+
path: /etc/crio/crio.conf
66
insertbefore: .*crio.runtime.runtimes.runc.*
77
backup: yes
88
block: |

test/helpers.bash

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ function setup_test() {
207207
CRIO_SOCKET="$TESTDIR/crio.sock"
208208
CRIO_CONFIG_DIR="$TESTDIR/crio.conf.d"
209209
mkdir "$CRIO_CONFIG_DIR"
210-
CRIO_CONFIG="$CRIO_CONFIG_DIR/00-default.conf"
210+
CRIO_CONFIG="$TESTDIR/crio.conf"
211211
CRIO_CNI_CONFIG="$TESTDIR/cni/net.d/"
212212
CRIO_LOG="$TESTDIR/crio.log"
213213

@@ -354,7 +354,7 @@ function start_crio_no_setup() {
354354
"$CRIO_BINARY_PATH" \
355355
--default-mounts-file "$TESTDIR/containers/mounts.conf" \
356356
-l debug \
357-
-c "" \
357+
-c "$CRIO_CONFIG" \
358358
-d "$CRIO_CONFIG_DIR" \
359359
&> >(tee "$CRIO_LOG") &
360360
CRIO_PID=$!
@@ -371,7 +371,7 @@ function start_crio() {
371371
# Start crio with journald logging
372372
function start_crio_journald() {
373373
setup_crio "$@"
374-
"$CRIO_BINARY_PATH" --log-journald -c "" -d "$CRIO_CONFIG_DIR" &
374+
"$CRIO_BINARY_PATH" --log-journald -c "$CRIO_CONFIG" -d "$CRIO_CONFIG_DIR" &
375375
CRIO_PID=$!
376376
wait_until_reachable
377377
pull_test_containers
@@ -395,7 +395,7 @@ function check_journald() {
395395
# Start crio with metrics enable
396396
function start_crio_metrics() {
397397
setup_crio "$@"
398-
"$CRIO_BINARY_PATH" --enable-metrics -c "" -d "$CRIO_CONFIG_DIR" &
398+
"$CRIO_BINARY_PATH" --enable-metrics -c "$CRIO_CONFIG" -d "$CRIO_CONFIG_DIR" &
399399
CRIO_PID=$!
400400
wait_until_reachable
401401
pull_test_containers

0 commit comments

Comments
 (0)