#1399 backend: cleanup the example configuration
Merged 3 years ago by praiskup. Opened 3 years ago by praiskup.
Unknown source backend-config-update  into  master

@@ -1,18 +1,17 @@

  [backend]

- 

  # URL where are results visible

- # default is http://copr

+ # default is http://copr-be

  results_baseurl=https://copr-be.cloud.fedoraproject.org/results

  

- # default is http://coprs/rest/api

+ # Mandatory http address of running Copr Frontend instance.  Backend talks to

s/running/a running/

+ # Frontend e.g. over <frontend_base_url>/backend/ URL.

+ # default is http://copr-fe

  frontend_base_url=http://copr-fe-dev.cloud.fedoraproject.org

  

  # must have same value as BACKEND_PASSWORD from have frontend in /etc/copr/copr.conf

  # default is PASSWORDHERE but you really should change it. really.

  frontend_auth=backend_password_from_fe_config

  

- dist_git_url=distgitvm.example.com

- 

  # directory where results are stored

  # should be accessible from web using 'results_baseurl' URL

  # no default
@@ -50,39 +49,42 @@

  # actions.

  #actions_max_workers=10

  

- # exit on worker failure

- # default is false

- #exit_on_worker=false

- 

  # publish fedmsg notifications from workers if true

- # default is false

  #fedmsg_enabled=false

  

- 

  # enable package signing, require configured

  # signer host and correct /etc/sign.conf

- # do_sign=false

+ #do_sign=false

  

  # host or ip of machine with copr-keygen

  # usually the same as in /etc/sign.conf

- # keygen_host=example.com

+ #keygen_host=example.com

  

  # minimum age for builds to be pruned

  prune_days=14

  

  # logging settings

- # log_dir=/var/log/copr-backend/

- # log_level=info

- # log_format=[%(asctime)s][%(levelname)6s][PID:%(process)d][%(name)10s][%(filename)s:%(funcName)s:%(lineno)d] %(message)s

- 

- # verbose=False

+ #log_dir=/var/log/copr-backend/

+ #log_level=info

+ #log_format=[%(asctime)s][%(levelname)6s][PID:%(process)d][%(name)10s][%(filename)s:%(funcName)s:%(lineno)d] %(message)s

  

+ # Configure the mandatory access to a running Redis DB instance.

  #redis_host=127.0.0.1

  #redis_port=6379

  #redis_db=0

  

+ 

  [builder]

  # default is 1800

  timeout=3600

  

- # consecutive_failure_threshold=10

+ # Number if build failures needed to happen "in row" before we start reporting

+ # an issue by the script /usr/bin/check_consecutive_build_fails.py

+ #consecutive_failure_threshold=10

+ 

+ 

+ [ssh]

+ # SSH config file which is used by backend when communicating with allocated

+ # builders.  By default this is not set so we let the decision on the ssh

+ # implementation itself (usually it uses '<home directory>/.ssh/config' file).

+ #builder_config=/home/copr/.ssh/config

@@ -11,8 +11,6 @@

  # default is PASSWORDHERE but you really should change it. really.

  frontend_auth=backend_password_from_fe_config

  

- dist_git_url=distgitvm.example.com

- 

  # Set a number of build groups (default is 1)

  build_groups=1

  
@@ -47,10 +45,6 @@

  # default is 8

  num_workers=5

  

- # exit on worker failure

- # default is false

- #exit_on_worker=false

- 

  # publish fedmsg notifications from workers if true

  # default is false

  #fedmsg_enabled=false
@@ -61,8 +55,6 @@

  # do_sign=false

  # keygen_host=example.com

  

- verbose=true

- 

  # minimum age for builds to be pruned

  prune_days=14

  

@@ -202,9 +202,6 @@

          opts.frontend_base_url = _get_conf(

              cp, "backend", "frontend_base_url", "http://copr-fe")

  

-         opts.dist_git_url = _get_conf(

-             cp, "backend", "dist_git_url", "http://dist-git")

- 

          opts.frontend_auth = _get_conf(

              cp, "backend", "frontend_auth", "PASSWORDHERE")

  
@@ -287,8 +284,6 @@

  

          opts.destdir = _get_conf(cp, "backend", "destdir", None, mode="path")

  

-         opts.exit_on_worker = _get_conf(

-             cp, "backend", "exit_on_worker", False, mode="bool")

          opts.fedmsg_enabled = _get_conf(

              cp, "backend", "fedmsg_enabled", False, mode="bool")

          opts.sleeptime = _get_conf(
@@ -316,8 +311,6 @@

              cp, "backend", "log_level", "info")

          opts.log_format = _get_conf(

              cp, "backend", "log_format", default_log_format)

-         opts.verbose = _get_conf(

-             cp, "backend", "verbose", False, mode="bool")

  

          opts.prune_days = _get_conf(cp, "backend", "prune_days", None, mode="int")

  

@@ -15,9 +15,6 @@

  #frontend_auth=1234

  frontend_auth=1234

  

- dist_git_url=http://localhost:5001/cgit

- #dist_git_url=http://cgit

- 

  # comma-separated architectures

  # default is i386,x86_64

  architectures=i386,x86_64
@@ -65,10 +62,6 @@

  # default is 10

  sleeptime=30

  

- # exit on worker failure

- # default is false

- #exit_on_worker=false

- 

  # publish fedmsg notifications from workers if true

  # default is false

  #fedmsg_enabled=false
@@ -89,8 +82,6 @@

  # log_dir=/var/log/copr-backend/

  # log_level=info

  

- # verbose=False

- 

  redis_host=127.0.0.1

  redis_port=6380

  

  • drop the unused "dist_git_url" config option
  • drop the unused "exit_on_worker" config option
  • drop unused "verbose" config option
  • document tht "consecutive_failure_threshold" config option
  • document the "ssh.builder_config" option
  • document Redis DB config options
  • white-space "style" fixes
  • document the "frontend_base_url" option

Just git-grepping the code and we have a possibility to toggle verbose in copr_prune_results.py but we always assume it's True. I think the idea was to read its value from the config and pass it to the appropriate functions. However, we are not doing so and I don't think it's necessary so we can drop it from the config.

rebased onto e581967

3 years ago

@frostyx , I concur with what you wrote above.

The main idea here is that we probably don't want to put anything else than
log_level to backend configuration .... the "verbose" option is only useful IMO
when we deal with some command-line command which logs to stdout/err,
and that's not backends' daemons case.

Pull-Request has been merged by praiskup

3 years ago