Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Globals
VERSION="1.5.15"
VERSION="1.5.16"
CEPH_VERSION="20.2.0"
SPDK_VERSION="25.05"
CONTAINER_REGISTRY="quay.io/ceph"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ server.crt
server.key
client.crt
client.key
control/constants.py
3 changes: 3 additions & 0 deletions Dockerfile.spdk
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ ARG SPDK_CEPH_VERSION \
SPDK_CONFIGURE_ARGS \
SPDK_TARGET_ARCH \
SPDK_MAKEFLAGS \
SPDK_GIT_COMMIT \
ACCEL_CONFIG_SRC

RUN <<EOF
Expand All @@ -31,6 +32,7 @@ RUN <<EOF
echo SPDK_TARGET_ARCH=$SPDK_TARGET_ARCH
echo SPDK_MAKEFLAGS=$SPDK_MAKEFLAGS
echo CEPH_CLUSTER_CEPH_REPO_BASEURL=$CEPH_CLUSTER_CEPH_REPO_BASEURL
echo SPDK_GIT_COMMIT=$SPDK_GIT_COMMIT
echo ACCEL_CONFIG_SRC=$ACCEL_CONFIG_SRC
echo ======================================================================
EOF
Expand Down Expand Up @@ -112,6 +114,7 @@ RUN \
SPDK_VERSION=${SPDK_VERSION:?} \
RPM_RELEASE=0 \
MAKEFLAGS=$SPDK_MAKEFLAGS \
SPDK_GIT_COMMIT=$SPDK_GIT_COMMIT \
rpmbuild/rpm.sh $SPDK_CONFIGURE_ARGS --target-arch="${SPDK_TARGET_ARCH:?}"

# build bdevperf example, will not be a part of generated rpm
Expand Down
26 changes: 23 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,33 @@ setup: ## Configure huge-pages (requires sudo/root password)
build pull logs down: SVC ?= ceph spdk bdevperf nvmeof nvmeof-devel nvmeof-cli discovery

build: export NVMEOF_GIT_REPO != git remote get-url origin
build: export NVMEOF_GIT_BRANCH != git name-rev --name-only HEAD
build: export NVMEOF_GIT_BRANCH != git rev-parse --abbrev-ref HEAD
build: export NVMEOF_GIT_COMMIT != git rev-parse HEAD
build: export SPDK_GIT_REPO != git -C spdk remote get-url origin
build: export SPDK_GIT_BRANCH != git -C spdk name-rev --name-only HEAD
build: export SPDK_GIT_BRANCH != git -C spdk rev-parse --abbrev-ref HEAD
build: export SPDK_GIT_COMMIT != git rev-parse HEAD:spdk
build: export BUILD_DATE != date -u +"%Y-%m-%d %H:%M:%S %Z"
build: export NVMEOF_GIT_MODIFIED_FILES != git status -s | grep -e "^ *M" | sed 's/^ *M //' | xargs
build: constfile

constfile:
@echo "class GatewayConstants:" > control/constants.py
@echo " NVMEOF_GIT_REPO = \"${NVMEOF_GIT_REPO}\"" >> control/constants.py
@echo " NVMEOF_GIT_BRANCH = \"${NVMEOF_GIT_BRANCH}\"" >> control/constants.py
@echo " NVMEOF_GIT_COMMIT = \"${NVMEOF_GIT_COMMIT}\"" >> control/constants.py
@echo " NVMEOF_VERSION = \"${NVMEOF_VERSION}\"" >> control/constants.py
@echo " SPDK_GIT_REPO = \"${SPDK_GIT_REPO}\"" >> control/constants.py
@echo " SPDK_GIT_BRANCH = \"${SPDK_GIT_BRANCH}\"" >> control/constants.py
@echo " SPDK_GIT_COMMIT = \"${SPDK_GIT_COMMIT}\"" >> control/constants.py
@echo " NVMEOF_SPDK_VERSION = \"${NVMEOF_SPDK_VERSION}\"" >> control/constants.py
@echo " BUILD_DATE = \"${BUILD_DATE}\"" >> control/constants.py
@echo " TARGET_PLATFORM = \"${TARGET_PLATFORM}\"" >> control/constants.py
@echo " SPDK_TARGET_ARCH = \"${SPDK_TARGET_ARCH}\"" >> control/constants.py
@echo " SPDK_MAKEFLAGS = \"${SPDK_MAKEFLAGS}\"" >> control/constants.py
@echo " SPDK_PKGDEP_ARGS = \"${SPDK_PKGDEP_ARGS}\"" >> control/constants.py
@echo " SPDK_CONFIGURE_ARGS = \"${SPDK_CONFIGURE_ARGS}\"" >> control/constants.py
@echo " NVMEOF_CEPH_VERSION = \"${NVMEOF_CEPH_VERSION}\"" >> control/constants.py
@echo " CEPH_CLUSTER_CEPH_REPO_BASEURL = \"${CEPH_CLUSTER_CEPH_REPO_BASEURL}\"" >> control/constants.py

# Variables
SHAMAN_FETCH_ATTEMPTS := 3
Expand Down Expand Up @@ -88,7 +108,7 @@ up:
clean: $(CLEAN) setup ## Clean-up environment
clean: override HUGEPAGES = 0
clean:
/usr/bin/rm -f control/proto/gateway_pb2_grpc.py control/proto/gateway_pb2.py control/proto/gateway_pb2.pyi control/proto/monitor_pb2_grpc.py control/proto/monitor_pb2.py control/proto/monitor_pb2.pyi
/usr/bin/rm -f control/proto/gateway_pb2_grpc.py control/proto/gateway_pb2.py control/proto/gateway_pb2.pyi control/proto/monitor_pb2_grpc.py control/proto/monitor_pb2.py control/proto/monitor_pb2.pyi control/constants.py

update-lockfile: run ## Update dependencies in lockfile (pdm.lock)
update-lockfile: SVC=nvmeof-builder-base
Expand Down
1 change: 1 addition & 0 deletions control/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
config = GatewayConfig(args.config)
gw_logger = GatewayLogger(config)
config.display_environment_info(gw_logger.logger)
config.display_gateway_constants(gw_logger.logger)
config.dump_config_file(gw_logger.logger)
with GatewayServer(config) as gateway:
gateway.serve()
Expand Down
14 changes: 14 additions & 0 deletions control/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import configparser
import os

from .constants import GatewayConstants


class GatewayConfig:
"""Loads and returns config file settings.
Expand Down Expand Up @@ -115,3 +117,15 @@ def display_environment_info(self, logger):
if git_spdk_commit:
logger.info(f"SPDK Git commit: {git_spdk_commit}")
self.env_shown = True

def display_gateway_constants(self, logger):
logger.info(
"====================================== Gateway constants "
"===============================================")
for k, v in vars(GatewayConstants).items():
if k.startswith("_"):
continue
logger.info(f"{k}: {v}")
logger.info(
"========================================================="
"===============================================")
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "pdm.backend"

[project]
name = "ceph-nvmeof"
version = "1.5.15"
version = "1.5.16"
description = "Service to provide Ceph storage over NVMe-oF protocol"
readme = "README.md"
requires-python = ">3.9.1"
Expand Down
2 changes: 1 addition & 1 deletion spdk
Submodule spdk updated 2 files
+0 −3 CONFIG
+8 −1 mk/spdk.common.mk
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[flake8]
max-line-length = 100
ignore =
exclude = control/constants.py