Skip to content

Commit

Permalink
Remove trademarked wording on configuration file and individual confi…
Browse files Browse the repository at this point in the history
…gs (valkey-io#29)

Remove trademarked wording on configuration layer.

Following changes for release notes:

1. Rename redis.conf to valkey.conf
2. Pre-filled config in the template config file: Changing pidfile to `/var/run/valkey_6379.pid`

Signed-off-by: Harkrishn Patro <[email protected]>
  • Loading branch information
hpatro authored and madolson committed Apr 7, 2024
1 parent d79f094 commit 0e0f58d
Show file tree
Hide file tree
Showing 13 changed files with 205 additions and 217 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ release.h
src/transfer.sh
src/configs
redis.ds
src/redis.conf
src/nodes.conf
src/*.conf
deps/lua/src/lua
deps/lua/src/luac
deps/lua/src/liblua.a
Expand Down
4 changes: 2 additions & 2 deletions sentinel.conf
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ sentinel down-after-milliseconds mymaster 30000
#
# For more information about ACL configuration please refer to the Redis
# website at https://redis.io/topics/acl and redis server configuration
# template redis.conf.
# template valkey.conf.

# ACL LOG
#
Expand All @@ -164,7 +164,7 @@ acllog-max-len 128
# ACL file, the server will refuse to start.
#
# The format of the external ACL user file is exactly the same as the
# format that is used inside redis.conf to describe users.
# format that is used inside valkey.conf to describe users.
#
# aclfile /etc/redis/sentinel-users.acl

Expand Down
6 changes: 3 additions & 3 deletions src/acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static unsigned long nextid = 0; /* Next command id that has not been assigned *
struct ACLCategoryItem {
const char *name;
uint64_t flag;
} ACLCommandCategories[] = { /* See redis.conf for details on each category. */
} ACLCommandCategories[] = { /* See valkey.conf for details on each category. */
{"keyspace", ACL_CATEGORY_KEYSPACE},
{"read", ACL_CATEGORY_READ},
{"write", ACL_CATEGORY_WRITE},
Expand Down Expand Up @@ -2207,7 +2207,7 @@ int ACLLoadConfiguredUsers(void) {

/* This function loads the ACL from the specified filename: every line
* is validated and should be either empty or in the format used to specify
* users in the redis.conf configuration or in the ACL file, that is:
* users in the valkey.conf or in the ACL file, that is:
*
* user <username> ... rules ...
*
Expand Down Expand Up @@ -2469,7 +2469,7 @@ int ACLSaveToFile(const char *filename) {

/* This function is called once the server is already running, modules are
* loaded, and we are ready to start, in order to load the ACLs either from
* the pending list of users defined in redis.conf, or from the ACL file.
* the pending list of users defined in valkey.conf, or from the ACL file.
* The function will just exit with an error if the user is trying to mix
* both the loading methods. */
void ACLLoadUsersAtStartup(void) {
Expand Down
4 changes: 2 additions & 2 deletions src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -1264,7 +1264,7 @@ int rewriteConfigRewriteLine(struct rewriteConfigState *state, const char *optio
}

/* Write the long long 'bytes' value as a string in a way that is parsable
* inside redis.conf. If possible uses the GB, MB, KB notation. */
* inside valkey.conf. If possible uses the GB, MB, KB notation. */
int rewriteConfigFormatMemory(char *buf, size_t len, long long bytes) {
int gb = 1024*1024*1024;
int mb = 1024*1024;
Expand Down Expand Up @@ -1462,7 +1462,7 @@ void rewriteConfigReplicaOfOption(standardConfig *config, const char *name, stru

/* If this is a master, we want all the slaveof config options
* in the file to be removed. Note that if this is a cluster instance
* we don't want a slaveof directive inside redis.conf. */
* we don't want a slaveof directive inside valkey.conf. */
if (server.cluster_enabled || server.masterhost == NULL) {
rewriteConfigMarkAsProcessed(state, name);
return;
Expand Down
2 changes: 1 addition & 1 deletion src/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -8577,7 +8577,7 @@ void moduleReleaseGIL(void) {
* used to send anything to the client, and has the db number where the event
* occurred as its selected db number.
*
* Notice that it is not necessary to enable notifications in redis.conf for
* Notice that it is not necessary to enable notifications in valkey.conf for
* module notifications to work.
*
* Warning: the notification callbacks are performed in a synchronous manner,
Expand Down
18 changes: 9 additions & 9 deletions src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -2118,7 +2118,7 @@ void initServerConfig(void) {

/* Command table -- we initialize it here as it is part of the
* initial configuration, since command names may be changed via
* redis.conf using the rename-command directive. */
* valkey.conf using the rename-command directive. */
server.commands = dictCreate(&commandTableDictType);
server.orig_commands = dictCreate(&commandTableDictType);
populateCommandTable();
Expand Down Expand Up @@ -3039,7 +3039,7 @@ void populateCommandTable(void) {

retval1 = dictAdd(server.commands, sdsdup(c->fullname), c);
/* Populate an additional dictionary that will be unaffected
* by rename-command statements in redis.conf. */
* by rename-command statements in valkey.conf. */
retval2 = dictAdd(server.orig_commands, sdsdup(c->fullname), c);
serverAssert(retval1 == DICT_OK && retval2 == DICT_OK);
}
Expand Down Expand Up @@ -3193,7 +3193,7 @@ struct redisCommand *lookupCommandByCString(const char *s) {

/* Lookup the command in the current table, if not found also check in
* the original table containing the original command names unaffected by
* redis.conf rename-command statement.
* valkey.conf rename-command statement.
*
* This is used by functions rewriting the argument vector such as
* rewriteClientCommandVector() in order to set client->cmd pointer
Expand Down Expand Up @@ -6391,7 +6391,7 @@ void version(void) {
}

void usage(void) {
fprintf(stderr,"Usage: ./redis-server [/path/to/redis.conf] [options] [-]\n");
fprintf(stderr,"Usage: ./redis-server [/path/to/valkey.conf] [options] [-]\n");
fprintf(stderr," ./redis-server - (read config from stdin)\n");
fprintf(stderr," ./redis-server -v or --version\n");
fprintf(stderr," ./redis-server -h or --help\n");
Expand All @@ -6401,11 +6401,11 @@ void usage(void) {
fprintf(stderr,"Examples:\n");
fprintf(stderr," ./redis-server (run the server with default conf)\n");
fprintf(stderr," echo 'maxmemory 128mb' | ./redis-server -\n");
fprintf(stderr," ./redis-server /etc/redis/6379.conf\n");
fprintf(stderr," ./redis-server /etc/valkey/6379.conf\n");
fprintf(stderr," ./redis-server --port 7777\n");
fprintf(stderr," ./redis-server --port 7777 --replicaof 127.0.0.1 8888\n");
fprintf(stderr," ./redis-server /etc/myredis.conf --loglevel verbose -\n");
fprintf(stderr," ./redis-server /etc/myredis.conf --loglevel verbose\n\n");
fprintf(stderr," ./redis-server /etc/myvalkey.conf --loglevel verbose -\n");
fprintf(stderr," ./redis-server /etc/myvalkey.conf --loglevel verbose\n\n");
fprintf(stderr,"Sentinel mode:\n");
fprintf(stderr," ./redis-server /etc/sentinel.conf --sentinel\n");
exit(1);
Expand All @@ -6422,7 +6422,7 @@ void redisAsciiArt(void) {

/* Show the ASCII logo if: log file is stdout AND stdout is a
* tty AND syslog logging is disabled. Also show logo if the user
* forced us to do so via redis.conf. */
* forced us to do so via valkey.conf. */
int show_logo = ((!server.syslog_enabled &&
server.logfile[0] == '\0' &&
isatty(fileno(stdout))) ||
Expand Down Expand Up @@ -6840,7 +6840,7 @@ void redisOutOfMemoryHandler(size_t allocation_size) {
allocation_size);
}

/* Callback for sdstemplate on proc-title-template. See redis.conf for
/* Callback for sdstemplate on proc-title-template. See valkey.conf for
* supported variables.
*/
static sds redisProcTitleGetVariable(const sds varname, void *arg)
Expand Down
4 changes: 2 additions & 2 deletions src/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -1716,7 +1716,7 @@ struct redisServer {
durationStats duration_stats[EL_DURATION_TYPE_NUM];

/* Configuration */
int verbosity; /* Loglevel in redis.conf */
int verbosity; /* Loglevel verbosity */
int maxidletime; /* Client timeout in seconds */
int tcpkeepalive; /* Set SO_KEEPALIVE if non-zero. */
int active_expire_enabled; /* Can be disabled for testing purposes. */
Expand Down Expand Up @@ -2289,7 +2289,7 @@ typedef int redisGetKeysProc(struct redisCommand *cmd, robj **argv, int argc, ge
*
* The following additional flags are only used in order to put commands
* in a specific ACL category. Commands can have multiple ACL categories.
* See redis.conf for the exact meaning of each.
* See valkey.conf for the exact meaning of each.
*
* @keyspace, @read, @write, @set, @sortedset, @list, @hash, @string, @bitmap,
* @hyperloglog, @stream, @admin, @fast, @slow, @pubsub, @blocking, @dangerous,
Expand Down
2 changes: 1 addition & 1 deletion tests/support/server.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ proc start_server {options {code undefined}} {
}

# write new configuration to temporary file
set config_file [tmpfile redis.conf]
set config_file [tmpfile valkey.conf]
create_server_config_file $config_file $config $config_lines

set stdout [format "%s/%s" [dict get $config "dir"] "stdout"]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_helper.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ proc run_solo {name code} {
proc cleanup {} {
if {!$::quiet} {puts -nonewline "Cleanup: may take some time... "}
flush stdout
catch {exec rm -rf {*}[glob tests/tmp/redis.conf.*]}
catch {exec rm -rf {*}[glob tests/tmp/valkey.conf.*]}
catch {exec rm -rf {*}[glob tests/tmp/server.*]}
if {!$::quiet} {puts "OK"}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/other.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ start_server {tags {"other external:skip"}} {
assert_equal $expect_port [lindex $cmdline 3]
assert_equal $expect_tls_port [lindex $cmdline 4]
assert_match "*/tests/tmp/server.*/socket" [lindex $cmdline 5]
assert_match "*/tests/tmp/redis.conf.*" [lindex $cmdline 6]
assert_match "*/tests/tmp/valkey.conf.*" [lindex $cmdline 6]

# Try setting a bad template
catch {r config set "proc-title-template" "{invalid-var}"} err
Expand Down
2 changes: 1 addition & 1 deletion utils/install_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ mkdir -p "$REDIS_DATA_DIR" || die "Could not create redis data directory"

#render the templates
TMP_FILE="/tmp/${REDIS_PORT}.conf"
DEFAULT_CONFIG="${SCRIPTPATH}/../redis.conf"
DEFAULT_CONFIG="${SCRIPTPATH}/../valkey.conf"
INIT_TPL_FILE="${SCRIPTPATH}/redis_init_script.tpl"
INIT_SCRIPT_DEST="/etc/init.d/redis_${REDIS_PORT}"
PIDFILE="/var/run/redis_${REDIS_PORT}.pid"
Expand Down
4 changes: 2 additions & 2 deletions utils/systemd-redis_server.service
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ Wants=network-online.target
After=network-online.target

[Service]
ExecStart=/usr/local/bin/redis-server --supervised systemd --daemonize no
ExecStart=/usr/local/bin/valkey-server --supervised systemd --daemonize no
## Alternatively, have redis-server load a configuration file:
#ExecStart=/usr/local/bin/redis-server /path/to/your/redis.conf
#ExecStart=/usr/local/bin/valkey-server /path/to/your/valkey.conf
LimitNOFILE=10032
NoNewPrivileges=yes
#OOMScoreAdjust=-900
Expand Down
Loading

0 comments on commit 0e0f58d

Please sign in to comment.