From d5e67b45fe1b39e58c9b6dbe8bd2b17ae2292950 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Wed, 22 Jun 2016 21:51:06 +0000 Subject: [PATCH 01/18] Some server side improvements for quick-mirror --- files/scripts/create-filelist | 16 ++++++++++------ files/scripts/update-fullfiletimelist | 2 +- roles/bodhi2/backend/files/update-fullfilelist | 2 +- roles/releng/files/update-fullfilelist | 2 +- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/files/scripts/create-filelist b/files/scripts/create-filelist index 836cc7663c..adf8104c61 100755 --- a/files/scripts/create-filelist +++ b/files/scripts/create-filelist @@ -36,7 +36,7 @@ def sha1(fname): return sha1.hexdigest() -def recursedir(path='.', skip=[]): +def recursedir(path='.', skip=[], alwaysskip=['.~tmp~']): """Just like scandir, but recursively. Will skip everything in the skip array, but only at the top level @@ -45,8 +45,11 @@ def recursedir(path='.', skip=[]): for entry in scandir(path): if entry.name in skip: continue + if entry.name in alwaysskip: + continue if entry.is_dir(follow_symlinks=False): - for rentry in recursedir(entry.path): + # Don't pass skip here, because we only skip in the top level + for rentry in recursedir(entry.path, alwaysskip=alwaysskip): yield rentry yield entry @@ -60,16 +63,16 @@ def parseopts(): p.add_argument('-C', '--checksum-file', action='append', dest='checksum_files', help='Include checksums of all instances of the specified file.') p.add_argument('-s', '--skip', action='store_true', - help='Skip fullfiletimelist in the top directory') + help='Skip the --filelist file in the top directory') p.add_argument('-S', '--skip-file', action='append', dest='skip_files', help='Skip the specified file in the top directory.') p.add_argument('-d', '--dir', help='Directory to scan (default: .).') p.add_argument('-t', '--timelist', type=argparse.FileType('w'), default=sys.stdout, - help='Filename of the file list with times (default: fullfiletimelist).') + help='Filename of the file list with times (default: stdout).') p.add_argument('-f', '--filelist', type=argparse.FileType('w'), default=null, - help='Filename of the file list without times (default: fullfilelist).') + help='Filename of the file list without times (default: no plain file list is generated).') opts = p.parse_args() @@ -82,7 +85,8 @@ def parseopts(): opts.skip_files = opts.skip_files or [] if opts.skip: - opts.skip_files += ['fullfiletimelist'] + if not opts.timelist.name == '': + opts.skip_files += [opts.timelist.name] return opts diff --git a/files/scripts/update-fullfiletimelist b/files/scripts/update-fullfiletimelist index 0bd2191b2f..44de5f2121 100755 --- a/files/scripts/update-fullfiletimelist +++ b/files/scripts/update-fullfiletimelist @@ -14,7 +14,7 @@ fi CREATE=/usr/local/bin/create-filelist # A single lockfile for everything we're modifying -LOCKFILE=.lock.create-filelist +LOCKFILE=/srv/.lock.create-filelist # The directory where all of the modules live TOPD=/srv/pub diff --git a/roles/bodhi2/backend/files/update-fullfilelist b/roles/bodhi2/backend/files/update-fullfilelist index 65e4ef4924..83614c1a28 100755 --- a/roles/bodhi2/backend/files/update-fullfilelist +++ b/roles/bodhi2/backend/files/update-fullfilelist @@ -14,7 +14,7 @@ fi CREATE=/usr/local/bin/create-filelist # A single lockfile for everything we're modifying -LOCKFILE=.lock.create-filelist +LOCKFILE=/srv/.lock.create-filelist # The directory where all of the modules live TOPD=/pub diff --git a/roles/releng/files/update-fullfilelist b/roles/releng/files/update-fullfilelist index 65e4ef4924..83614c1a28 100755 --- a/roles/releng/files/update-fullfilelist +++ b/roles/releng/files/update-fullfilelist @@ -14,7 +14,7 @@ fi CREATE=/usr/local/bin/create-filelist # A single lockfile for everything we're modifying -LOCKFILE=.lock.create-filelist +LOCKFILE=/srv/.lock.create-filelist # The directory where all of the modules live TOPD=/pub From 1184046d2f0deb6ee0c7fd62f6d8f8181fc17d6a Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Wed, 22 Jun 2016 22:05:52 +0000 Subject: [PATCH 02/18] do not install cron on mm-frontend-checkin01 --- roles/mirrormanager/frontend2/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mirrormanager/frontend2/tasks/main.yml b/roles/mirrormanager/frontend2/tasks/main.yml index b069a55aa3..43c906f190 100644 --- a/roles/mirrormanager/frontend2/tasks/main.yml +++ b/roles/mirrormanager/frontend2/tasks/main.yml @@ -112,7 +112,7 @@ tags: - config - mm2_frontend - when: env != "staging" + when: env != "staging" and inventory_hostname.startswith('mm-frontend0') # mirrormanager user ssh key(s) (used to transfer statistics from backend to frontends) - name: add authorized_keys for mirrormanager From 6f108f63a436da3957fdd708676550dba23e8c5b Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Wed, 22 Jun 2016 22:53:50 +0000 Subject: [PATCH 03/18] atomic01.qa isn't around anymore. --- inventory/group_vars/atomichw | 16 ---------------- inventory/inventory | 3 --- playbooks/groups/atomic.yml | 27 --------------------------- 3 files changed, 46 deletions(-) delete mode 100644 inventory/group_vars/atomichw delete mode 100644 playbooks/groups/atomic.yml diff --git a/inventory/group_vars/atomichw b/inventory/group_vars/atomichw deleted file mode 100644 index 37b0ffd72c..0000000000 --- a/inventory/group_vars/atomichw +++ /dev/null @@ -1,16 +0,0 @@ ---- -host_group: atomicbuilder -freezes: false -nrpe_procs_warn: 700 -nrpe_procs_crit: 800 - -fas_client_groups: atomic,sysadmin-atomic - -tcp_ports: [ 80, 443, 873 ] - -# Just blacklist this for now as it has a eth1 we do not want to configure. -ansible_ifcfg_blacklist: true - -eth0_ip: 10.5.124.150 -eth0_nm: 255.255.255.128 -gw: 10.5.124.254 diff --git a/inventory/inventory b/inventory/inventory index 124bfe8f75..f1128806d1 100644 --- a/inventory/inventory +++ b/inventory/inventory @@ -61,9 +61,6 @@ ask02.phx2.fedoraproject.org [ask-stg] ask01.stg.phx2.fedoraproject.org -[atomichw] -atomic01.qa.fedoraproject.org - [backup] backup01.phx2.fedoraproject.org diff --git a/playbooks/groups/atomic.yml b/playbooks/groups/atomic.yml deleted file mode 100644 index eb133498db..0000000000 --- a/playbooks/groups/atomic.yml +++ /dev/null @@ -1,27 +0,0 @@ -# -# I am guessing that this box will be like other hw boxes. -# - -- name: Build an atomic server. - hosts: atomic01.qa.fedoraproject.org - user: root - gather_facts: True - - vars_files: - - /srv/web/infra/ansible/vars/global.yml - - "/srv/private/ansible/vars.yml" - - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml - - roles: - - base - - hosts - - fas_client - - sudo - - tasks: - - include: "{{ tasks }}/yumrepos.yml" - - include: "{{ tasks }}/2fa_client.yml" - - include: "{{ tasks }}/motd.yml" - - handlers: - - include: "{{ handlers }}/restart_services.yml" From 5fa043804d3dcbc806c4472d9157e3785a50fd09 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Wed, 22 Jun 2016 22:54:30 +0000 Subject: [PATCH 04/18] also remove from master --- master.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/master.yml b/master.yml index e8c782bb6a..250dd79c22 100644 --- a/master.yml +++ b/master.yml @@ -16,7 +16,6 @@ - include: /srv/web/infra/ansible/playbooks/groups/arm-packager.yml - include: /srv/web/infra/ansible/playbooks/groups/arm-qa.yml - include: /srv/web/infra/ansible/playbooks/groups/ask.yml -- include: /srv/web/infra/ansible/playbooks/groups/atomic.yml - include: /srv/web/infra/ansible/playbooks/groups/autocloud-backend.yml - include: /srv/web/infra/ansible/playbooks/groups/autocloud-web.yml - include: /srv/web/infra/ansible/playbooks/groups/autosign.yml From 1e4e316cd3fdaf9b997d5cfe3d0d438dec64881b Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Wed, 22 Jun 2016 23:04:38 +0000 Subject: [PATCH 05/18] These have to use a local lock file as ftpsync doesnt have perms to /srv or / --- roles/bodhi2/backend/files/update-fullfilelist | 2 +- roles/releng/files/update-fullfilelist | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/bodhi2/backend/files/update-fullfilelist b/roles/bodhi2/backend/files/update-fullfilelist index 83614c1a28..65e4ef4924 100755 --- a/roles/bodhi2/backend/files/update-fullfilelist +++ b/roles/bodhi2/backend/files/update-fullfilelist @@ -14,7 +14,7 @@ fi CREATE=/usr/local/bin/create-filelist # A single lockfile for everything we're modifying -LOCKFILE=/srv/.lock.create-filelist +LOCKFILE=.lock.create-filelist # The directory where all of the modules live TOPD=/pub diff --git a/roles/releng/files/update-fullfilelist b/roles/releng/files/update-fullfilelist index 83614c1a28..65e4ef4924 100755 --- a/roles/releng/files/update-fullfilelist +++ b/roles/releng/files/update-fullfilelist @@ -14,7 +14,7 @@ fi CREATE=/usr/local/bin/create-filelist # A single lockfile for everything we're modifying -LOCKFILE=/srv/.lock.create-filelist +LOCKFILE=.lock.create-filelist # The directory where all of the modules live TOPD=/pub From 05026d0151614b900dec83a9b57eb6845d5b7b11 Mon Sep 17 00:00:00 2001 From: Ricky Elrod Date: Thu, 23 Jun 2016 00:37:51 +0000 Subject: [PATCH 06/18] add nagios/client to piwik.fic Signed-off-by: Ricky Elrod --- playbooks/hosts/piwik.fedorainfracloud.org.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/playbooks/hosts/piwik.fedorainfracloud.org.yml b/playbooks/hosts/piwik.fedorainfracloud.org.yml index d171f2535d..4956ea557b 100644 --- a/playbooks/hosts/piwik.fedorainfracloud.org.yml +++ b/playbooks/hosts/piwik.fedorainfracloud.org.yml @@ -26,6 +26,7 @@ - apache - base - piwik + - nagios/client pre_tasks: - include: "{{ tasks }}/yumrepos.yml" From fb56332fc1e7abe426d118196818a78113bd0b41 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 23 Jun 2016 00:40:01 +0000 Subject: [PATCH 07/18] readd proxy07 to wiki cache settings --- roles/mediawiki/templates/LocalSettings.php.fp.j2 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/roles/mediawiki/templates/LocalSettings.php.fp.j2 b/roles/mediawiki/templates/LocalSettings.php.fp.j2 index fec82996cc..c4de329cbd 100644 --- a/roles/mediawiki/templates/LocalSettings.php.fp.j2 +++ b/roles/mediawiki/templates/LocalSettings.php.fp.j2 @@ -381,6 +381,10 @@ $wgSquidServersNoPurge = array( "140.211.169.196", "192.168.1.63", + # proxy07 + "174.141.234.172", + "192.168.1.52", + # proxy08 "67.203.2.67", "2607:f188::dead:beef:cafe:fed1", @@ -423,6 +427,8 @@ $wgSquidServers = array( "192.168.1.25:6081", # proxy06 "192.168.1.63:6081", + # proxy07 + "192.168.1.52:6081", # proxy08 "192.168.1.78:6081", # proxy10 From d1220c01b1a9d27cbb66523c6ac5e8b9472e6098 Mon Sep 17 00:00:00 2001 From: Ricky Elrod Date: Thu, 23 Jun 2016 00:45:54 +0000 Subject: [PATCH 08/18] add handlers Signed-off-by: Ricky Elrod --- playbooks/hosts/piwik.fedorainfracloud.org.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/playbooks/hosts/piwik.fedorainfracloud.org.yml b/playbooks/hosts/piwik.fedorainfracloud.org.yml index 4956ea557b..8bf90f880a 100644 --- a/playbooks/hosts/piwik.fedorainfracloud.org.yml +++ b/playbooks/hosts/piwik.fedorainfracloud.org.yml @@ -20,6 +20,9 @@ - /srv/private/ansible/files/openstack/passwords.yml - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml + handlers: + - include: "{{ handlers }}/restart_services.yml" + roles: - sudo - hosts From d5d91c89b643d23e5c8beaec8b60e8a591c452d0 Mon Sep 17 00:00:00 2001 From: Martin Krizek Date: Thu, 23 Jun 2016 06:45:14 +0000 Subject: [PATCH 09/18] yumrepoinfo.conf: Fedora 24 was released --- roles/taskotron/taskotron-client/files/yumrepoinfo.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/taskotron/taskotron-client/files/yumrepoinfo.conf b/roles/taskotron/taskotron-client/files/yumrepoinfo.conf index 5852885648..c7bcb945b1 100644 --- a/roles/taskotron/taskotron-client/files/yumrepoinfo.conf +++ b/roles/taskotron/taskotron-client/files/yumrepoinfo.conf @@ -38,9 +38,9 @@ release_status = rawhide # Fedora 24 [f24] -url = %(rawhideurl)s -path = development/24 -release_status = branched +url = %(goldurl)s +path = 24 +release_status = stable [f24-updates] url = %(updatesurl)s From 8f202df0761bb008ad56e545b52c2f3026af44bc Mon Sep 17 00:00:00 2001 From: Martin Krizek Date: Thu, 23 Jun 2016 06:46:13 +0000 Subject: [PATCH 10/18] taskotron-prod: update abicheck blacklist --- roles/taskotron/taskotron-trigger/templates/trigger.cfg.j2 | 4 ---- 1 file changed, 4 deletions(-) diff --git a/roles/taskotron/taskotron-trigger/templates/trigger.cfg.j2 b/roles/taskotron/taskotron-trigger/templates/trigger.cfg.j2 index 01a04bb2cf..ced045296c 100644 --- a/roles/taskotron/taskotron-trigger/templates/trigger.cfg.j2 +++ b/roles/taskotron/taskotron-trigger/templates/trigger.cfg.j2 @@ -27,8 +27,4 @@ namespace = rpms-checks [abicheck] critpath_filepath = {{ trigger_critpath_file }} -{% if deployment_type in ['dev', 'stg'] %} critpath_exclude = firefox,thunderbird,kernel,kdelibs,kdepim -{% else %} -critpath_exclude = -{% endif %} From b24c37d2ea3a53cec0037fd6eac86eea2b778378 Mon Sep 17 00:00:00 2001 From: Martin Krizek Date: Thu, 23 Jun 2016 08:08:33 +0000 Subject: [PATCH 11/18] taskotron: change namespace 'qa' to 'dist' --- roles/taskotron/taskotron-client/templates/namespaces.yaml.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/taskotron/taskotron-client/templates/namespaces.yaml.j2 b/roles/taskotron/taskotron-client/templates/namespaces.yaml.j2 index 07b96915ec..cc7668c651 100644 --- a/roles/taskotron/taskotron-client/templates/namespaces.yaml.j2 +++ b/roles/taskotron/taskotron-client/templates/namespaces.yaml.j2 @@ -4,12 +4,12 @@ namespaces_safe: # A list of git repos that are allowed to post a result into a particular namespace namespaces_whitelist: - qa: + dist: # due to a bug in libtaskotron, list all repos instead of prefix #- {{ grokmirror_user }}@{{ buildmaster }}:/var/lib/git/mirror/fedoraqa/ - {{ grokmirror_user }}@{{ buildmaster }}:/var/lib/git/mirror/fedoraqa/rpmlint/ - {{ grokmirror_user }}@{{ buildmaster }}:/var/lib/git/mirror/fedoraqa/depcheck/ - {{ grokmirror_user }}@{{ buildmaster }}:/var/lib/git/mirror/fedoraqa/upgradepath/ - - {{ grokmirror_user }}@{{ buildmaster }}:/var/lib/git/mirror/fedoraqa/dockerautotest/ + - {{ grokmirror_user }}@{{ buildmaster }}:/var/lib/git/mirror/fedoraqa/abicheck/ pkg: - git://pkgs.fedoraproject.org/rpms-checks/ From 6dc59b465a2586f49c1cb82fadbfcf4323b0a88d Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Thu, 23 Jun 2016 09:19:28 +0000 Subject: [PATCH 12/18] releng: disable secondary branched --- roles/releng/files/aarch64.branched | 2 +- roles/releng/files/power64.branched | 2 +- roles/releng/files/s390.branched | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/releng/files/aarch64.branched b/roles/releng/files/aarch64.branched index b91e8bc76f..dbd2287813 100644 --- a/roles/releng/files/aarch64.branched +++ b/roles/releng/files/aarch64.branched @@ -1,3 +1,3 @@ # branched devel compose MAILTO=releng-cron@lists.fedoraproject.org -15 7 * * * root TMPDIR=`mktemp -d /tmp/branched.XXXXXX` && cd $TMPDIR && git clone https://pagure.io/pungi-fedora.git && cd pungi-fedora && git checkout f24-secondary-arch && LANG=en_US.UTF-8 ./nightly.sh arm +#15 7 * * * root TMPDIR=`mktemp -d /tmp/branched.XXXXXX` && cd $TMPDIR && git clone https://pagure.io/pungi-fedora.git && cd pungi-fedora && git checkout f24-secondary-arch && LANG=en_US.UTF-8 ./nightly.sh arm diff --git a/roles/releng/files/power64.branched b/roles/releng/files/power64.branched index fa5651eb90..f66dd98147 100644 --- a/roles/releng/files/power64.branched +++ b/roles/releng/files/power64.branched @@ -1,3 +1,3 @@ # branched devel compose MAILTO=releng-cron@lists.fedoraproject.org -15 7 * * * root TMPDIR=`mktemp -d /tmp/branched.XXXXXX` && cd $TMPDIR && git clone https://pagure.io/pungi-fedora.git && cd pungi-fedora && git checkout f24-secondary-arch && LANG=en_US.UTF-8 ./nightly.sh ppc +#15 7 * * * root TMPDIR=`mktemp -d /tmp/branched.XXXXXX` && cd $TMPDIR && git clone https://pagure.io/pungi-fedora.git && cd pungi-fedora && git checkout f24-secondary-arch && LANG=en_US.UTF-8 ./nightly.sh ppc diff --git a/roles/releng/files/s390.branched b/roles/releng/files/s390.branched index 661c58bcd9..1d38775d2c 100644 --- a/roles/releng/files/s390.branched +++ b/roles/releng/files/s390.branched @@ -1,3 +1,3 @@ # branched devel compose MAILTO=releng-cron@lists.fedoraproject.org -15 10 * * * root TMPDIR=`mktemp -d /tmp/branched.XXXXXX` && cd $TMPDIR && git clone https://pagure.io/pungi-fedora.git && cd pungi-fedora && git checkout f24-secondary-arch && LANG=en_US.UTF-8 ./nightly.sh s390 +#15 10 * * * root TMPDIR=`mktemp -d /tmp/branched.XXXXXX` && cd $TMPDIR && git clone https://pagure.io/pungi-fedora.git && cd pungi-fedora && git checkout f24-secondary-arch && LANG=en_US.UTF-8 ./nightly.sh s390 From 64d1190f9365d2d4d0fe2338570893483910b630 Mon Sep 17 00:00:00 2001 From: Michael Simacek Date: Thu, 23 Jun 2016 13:16:09 +0200 Subject: [PATCH 13/18] Update koschei config for new version --- .../backend/templates/config-backend.cfg.j2 | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/roles/koschei/backend/templates/config-backend.cfg.j2 b/roles/koschei/backend/templates/config-backend.cfg.j2 index 402388c801..18ae5b04cf 100644 --- a/roles/koschei/backend/templates/config-backend.cfg.j2 +++ b/roles/koschei/backend/templates/config-backend.cfg.j2 @@ -19,32 +19,21 @@ config = { "ca": "/etc/koschei/fedora-ca.cert", "serverca": "/etc/koschei/fedora-ca.cert", }, - "source_tag": "{{ koschei_koji_tag }}", - "target_tag": "{{ koschei_koji_tag }}", - "build_tag": "{{ koschei_koji_tag }}-build", "max_builds": 40, "build_arches": ['i386', 'x86_64', 'armhfp'], - "build_opts": { - }, "load_threshold": 0.65, "task_priority": 30, - "repo_url": "http://{{ koschei_kojipkgs }}/repos/{build_tag}/{repo_id}/{arch}", }, "dependency": { "build_group": "build", "for_arch": "x86_64", "repo_cache_items": 10, - "keep_build_deps_for": 1, - "local": False, "arches": ['x86_64', 'i386'], "persist_chunk_size": 300, "resolver_queue_size": 100, "dependency_fetch_chunk_size": 150, - "cache_l1_capacity": 3, - "cache_l2_capacity": 50, - "cache_l1_threads": 3, - "cache_l2_threads": 1, - "cache_threads_max": 4, + "dependency_cache_capacity": 50000, + "cache_l2_capacity": 100, "ignore_weak_deps": True, }, "services": { From e8be76095e44b271e080cf8f0ad7633ae042790b Mon Sep 17 00:00:00 2001 From: root Date: Thu, 23 Jun 2016 14:10:31 +0000 Subject: [PATCH 14/18] releng: fix typo in s390 details --- inventory/host_vars/compose-s390-01.s390.fedoraproject.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inventory/host_vars/compose-s390-01.s390.fedoraproject.org b/inventory/host_vars/compose-s390-01.s390.fedoraproject.org index 60bc410d11..5ec3ff3c35 100644 --- a/inventory/host_vars/compose-s390-01.s390.fedoraproject.org +++ b/inventory/host_vars/compose-s390-01.s390.fedoraproject.org @@ -14,7 +14,7 @@ main_bridge: br1 koji_hub_nfs: "fedora_s390/data" kojipkgs_url: s390pkgs.fedoraproject.org -kojihub_url: 390koji.fedoraproject.org/kojihub +kojihub_url: s390.koji.fedoraproject.org/kojihub kojihub_scheme: https koji_server_url: "http://s390.koji.fedoraproject.org/kojihub" From 0398171c7bcb6df722be3c71d9481d4b8029d115 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Thu, 23 Jun 2016 16:15:29 +0200 Subject: [PATCH 15/18] Try logging the message_id when reporting an error --- roles/fedmsg/base/templates/logging.py.j2 | 40 +++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/roles/fedmsg/base/templates/logging.py.j2 b/roles/fedmsg/base/templates/logging.py.j2 index e557cfe5ce..4f9c70ba39 100644 --- a/roles/fedmsg/base/templates/logging.py.j2 +++ b/roles/fedmsg/base/templates/logging.py.j2 @@ -76,8 +76,47 @@ class ContextInjector(logging.Filter): if seen_errors[key] > error_limit: record.farewell = radio_silence % error_limit + msg_id = "" + try: + msg = self.get_msg_object() + if isinstance(msg, dict): + if 'msg_id' in msg: + msg_id = msg['msg_id'] + elif 'msg' in msg: + if 'msg_id' in msg['msg']: + msg_id = msg['msg']['msg_id'] + except: + pass + + record.msg_id = msg_id + return True + @staticmethod + def get_msg_object(): + """ Return the current request object + + This is insane. + + Unless your method or function is passed a reference to the trac + 'request' object, there is no way to get ahold of the currently + logged in user. Furthermore, there is no way globally to get ahold + of the current request object. + + Here, we crawl our way back up the call stack until we find the + first place that has 'req' as a local instance variable and attempt + to extract the username of the current user from that. + + Please forgive me (and Ralph, the original author of this code). + """ + + for frame in (f[0] for f in inspect.stack()): + if 'msg' in frame.f_locals: + return frame.f_locals['msg'] + + # This code is reached if there's no Request. Most common case is trac-admin + return None + @staticmethod def format_callstack(): for i, frame in enumerate(f[0] for f in inspect.stack()): @@ -126,6 +165,7 @@ host: %(host)s PID: %(pid)s name: %(proc_name)s command: %(command_line)s +msg_id: %(msg_id)s Callstack that lead to the logging statement -------------------------------------------- From 94b3bd0a158c5bbe4c22240a7c7707dcdb69e4d3 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Thu, 23 Jun 2016 14:18:15 +0000 Subject: [PATCH 16/18] releng: fix typo in s390 details --- inventory/host_vars/compose-s390-01.s390.fedoraproject.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inventory/host_vars/compose-s390-01.s390.fedoraproject.org b/inventory/host_vars/compose-s390-01.s390.fedoraproject.org index 60bc410d11..5ec3ff3c35 100644 --- a/inventory/host_vars/compose-s390-01.s390.fedoraproject.org +++ b/inventory/host_vars/compose-s390-01.s390.fedoraproject.org @@ -14,7 +14,7 @@ main_bridge: br1 koji_hub_nfs: "fedora_s390/data" kojipkgs_url: s390pkgs.fedoraproject.org -kojihub_url: 390koji.fedoraproject.org/kojihub +kojihub_url: s390.koji.fedoraproject.org/kojihub kojihub_scheme: https koji_server_url: "http://s390.koji.fedoraproject.org/kojihub" From 93c314082696acbbfc6845d1710954eb498cad83 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Thu, 23 Jun 2016 16:22:04 +0200 Subject: [PATCH 17/18] Ralph advised to browse top-down and adjust doc --- roles/fedmsg/base/templates/logging.py.j2 | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/roles/fedmsg/base/templates/logging.py.j2 b/roles/fedmsg/base/templates/logging.py.j2 index 4f9c70ba39..ac49794267 100644 --- a/roles/fedmsg/base/templates/logging.py.j2 +++ b/roles/fedmsg/base/templates/logging.py.j2 @@ -98,19 +98,15 @@ class ContextInjector(logging.Filter): This is insane. - Unless your method or function is passed a reference to the trac - 'request' object, there is no way to get ahold of the currently - logged in user. Furthermore, there is no way globally to get ahold - of the current request object. - - Here, we crawl our way back up the call stack until we find the - first place that has 'req' as a local instance variable and attempt - to extract the username of the current user from that. + There is no way to know the actual fedmsg message at this point in + the code, so we're crawling our way down the call stack until we + find the first place with a 'msg' local instance variable and + attempt to extract the msg_id from it (later). Please forgive me (and Ralph, the original author of this code). """ - for frame in (f[0] for f in inspect.stack()): + for frame in (f[0] for f in reversed(inspect.stack())): if 'msg' in frame.f_locals: return frame.f_locals['msg'] From 2b61d726d455d009cb9a05009bfb23eaac837be6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Thu, 23 Jun 2016 20:13:12 +0200 Subject: [PATCH 18/18] remove vgologuz from acl it has been more than 1/2 year since he was active and it does not look he will be active anymore --- inventory/group_vars/copr-front-stg | 2 +- inventory/host_vars/copr-be-dev.cloud.fedoraproject.org | 2 +- inventory/host_vars/copr-dist-git-dev.fedorainfracloud.org | 2 +- inventory/host_vars/copr-fe-dev.cloud.fedoraproject.org | 2 +- playbooks/hosts/fed-cloud09.cloud.fedoraproject.org.yml | 2 -- roles/copr/frontend/tasks/main.yml | 1 - 6 files changed, 4 insertions(+), 7 deletions(-) diff --git a/inventory/group_vars/copr-front-stg b/inventory/group_vars/copr-front-stg index 6b7d14db84..aea89d63dd 100644 --- a/inventory/group_vars/copr-front-stg +++ b/inventory/group_vars/copr-front-stg @@ -2,6 +2,6 @@ copr_frontend_public_hostname: "copr-fe-dev.cloud.fedoraproject.org" csi_security_category: Low -csi_primary_contact: msuchy (mirek, vgologuz) | IRC #fedora-admin, #fedora-buildsys +csi_primary_contact: msuchy (mirek), clime | IRC #fedora-admin, #fedora-buildsys csi_purpose: Provide the testing environment of copr's frontend csi_relationship: This host is the testing environment for copr's web interface diff --git a/inventory/host_vars/copr-be-dev.cloud.fedoraproject.org b/inventory/host_vars/copr-be-dev.cloud.fedoraproject.org index 5ce301b0f7..789325c33d 100644 --- a/inventory/host_vars/copr-be-dev.cloud.fedoraproject.org +++ b/inventory/host_vars/copr-be-dev.cloud.fedoraproject.org @@ -7,7 +7,7 @@ security_group: web-80-anywhere-persistent,web-443-anywhere-persistent,ssh-anywh zone: nova hostbase: copr-be-dev- public_ip: 209.132.184.53 -root_auth_users: msuchy pingou vgologuz frostyx asamalik clime +root_auth_users: msuchy pingou frostyx asamalik clime description: copr dispatcher and repo server - dev instance tcp_ports: ['22', '80', '443'] # volumes: copr-be-dev-data diff --git a/inventory/host_vars/copr-dist-git-dev.fedorainfracloud.org b/inventory/host_vars/copr-dist-git-dev.fedorainfracloud.org index e301b93591..359993f961 100644 --- a/inventory/host_vars/copr-dist-git-dev.fedorainfracloud.org +++ b/inventory/host_vars/copr-dist-git-dev.fedorainfracloud.org @@ -7,7 +7,7 @@ security_group: web-80-anywhere-persistent,ssh-anywhere-persistent,default zone: nova hostbase: copr-dist-git-dev- public_ip: 209.132.184.179 -root_auth_users: ryanlerch pingou msuchy asamalik vgologuz frostyx clime +root_auth_users: ryanlerch pingou msuchy asamalik frostyx clime description: dist-git for copr service - dev instance tcp_ports: [22, 80] # volumes: copr-dist-git-dev diff --git a/inventory/host_vars/copr-fe-dev.cloud.fedoraproject.org b/inventory/host_vars/copr-fe-dev.cloud.fedoraproject.org index 99502a2e7c..0229144520 100644 --- a/inventory/host_vars/copr-fe-dev.cloud.fedoraproject.org +++ b/inventory/host_vars/copr-fe-dev.cloud.fedoraproject.org @@ -7,7 +7,7 @@ security_group: web-80-anywhere-persistent,web-443-anywhere-persistent,ssh-anywh zone: nova hostbase: copr-fe-dev- public_ip: 209.132.184.55 -root_auth_users: ryanlerch pingou msuchy asamalik vgologuz frostyx clime +root_auth_users: ryanlerch pingou msuchy asamalik frostyx clime description: copr frontend server - dev instance tcp_ports: [22, 80, 443] # volumes: copr-fe-dev-db diff --git a/playbooks/hosts/fed-cloud09.cloud.fedoraproject.org.yml b/playbooks/hosts/fed-cloud09.cloud.fedoraproject.org.yml index 74ef3937f5..aa8d922434 100644 --- a/playbooks/hosts/fed-cloud09.cloud.fedoraproject.org.yml +++ b/playbooks/hosts/fed-cloud09.cloud.fedoraproject.org.yml @@ -747,7 +747,6 @@ - { name: samkottler, email: 'samkottler@fedoraproject.org', tenant: infrastructure, password: "{{samkottler_password}}" } - { name: tflink, email: 'tflink@fedoraproject.org', tenant: qa, password: "{{tflink_password}}" } - { name: twisted, email: 'buildbot@twistedmatrix.com', tenant: pythonbots, password: "{{twisted_password}}" } - - { name: vgologuz, email: 'vgologuz@redhat.com', tenant: copr, password: "{{vgologuz_password}}" } - { name: roshi, email: 'roshi@fedoraproject.org', tenant: qa, password: "{{roshi_password}}" } - { name: maxamillion, email: 'maxamillion@fedoraproject.org', tenant: infrastructure, password: "{{maxamillion_password}}" } - { name: clime, email: 'clime@redhat.com', tenant: copr, password: "{{clime_password}}" } @@ -845,7 +844,6 @@ - { user: puiterwijk, tenant: transient } - { user: mizdebsk, tenant: infrastructure } - { user: mizdebsk, tenant: transient } - - { user: vgologuz, tenant: coprdev } - { user: clime, tenant: coprdev } tags: - openstack_users diff --git a/roles/copr/frontend/tasks/main.yml b/roles/copr/frontend/tasks/main.yml index ad7def1795..08cc5bea30 100644 --- a/roles/copr/frontend/tasks/main.yml +++ b/roles/copr/frontend/tasks/main.yml @@ -85,7 +85,6 @@ - spot - nb - kevin - - vgologuz - name: rebuild indexes command: ./manage.py update_indexes