FBR: Make new-updates-sync resync on re-stage without need for state
deletion
by Patrick マルタインアンドレアス Uiterwijk
Hi,
So, for now (until https://github.com/fedora-infra/bodhi/pull/1986 gets finished and merged), it might happen that Bodhi stages a repo a second time (if it crashed while waiting for sync), which new-updates-sync doesn't notice, meaning releng needs to manually clean up the state file.
This patch should make new-updates-sync detect this case and force a resync.
Can I get +1s?
Patrick
diff --git a/roles/bodhi2/backend/files/new-updates-sync b/roles/bodhi2/backend/files/new-updates-sync
index fba2a3d27..df59cd421 100755
--- a/roles/bodhi2/backend/files/new-updates-sync
+++ b/roles/bodhi2/backend/files/new-updates-sync
@@ -328,6 +328,28 @@ def sync_single_release(release):
with open(curstatefile, 'r') as f:
curstate = f.read().split()[0]
+ # Resync if Bodhi failed out during the sync waiting, which leads
+ # to changed repomd.xml without an updated repo.
+ # (updateinfo is inserted again)
+ # Fix: https://github.com/fedora-infra/bodhi/pull/1986
+ if curstate and curstate == target:
+ curstatestat = os.stat(curstatefile)
+ repostat = os.stat(os.path.join(
+ target, 'compose', 'Everything',
+ RELEASES[release]['repos'][repo]['to'][0]['arches'][0],
+ 'os', 'repodata', 'repomd.xml'))
+ if curstatestat[stat.ST_MTIME] < repostat[stat.ST_MTIME]:
+ # If the curstate file has an earlier mtime than the repomd
+ # of the first architecture, this repo was re-generated
+ # after the first time it got staged. Resync.
+ logger.error(
+ 'Re-stage detected of %s %s. '
+ 'State mtime: %s, repo mtime: %s',
+ release, repo,
+ curstatestat[stat.ST_MTIME],
+ repostat[stat.ST_MTIME])
+ curstate = None
+
if curstate and curstate == target:
logger.info('This repo has already been synced')
else:
5 years, 11 months
FBR : Disable F28 branched compose and enable two week atomic,
cloud and container nightlies
by Mohan Boddu
Now that we got a F28 RC final compose, we dont need branched composes anymore and also we should enable two week atomic, cloud and container nightlies
diff --git a/roles/releng/files/branched b/roles/releng/files/branched
index e303942..b560be1 100644
--- a/roles/releng/files/branched
+++ b/roles/releng/files/branched
@@ -1,4 +1,4 @@
# branched compose
MAILTO=releng-cron(a)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 f28 && LANG=en_US.UTF-8 ./nightly.sh && sudo -u ftpsync /usr/local/bin/update-fullfiletimelist -l /pub/fedora-secondary/update-fullfiletimelist.lock -t /pub fedora fedora-secondary
+#15 7 * * * root TMPDIR=`mktemp -d /tmp/branched.XXXXXX` && cd $TMPDIR && git clone https://pagure.io/pungi-fedora.git && cd pungi-fedora && git checkout f28 && LANG=en_US.UTF-8 ./nightly.sh && sudo -u ftpsync /usr/local/bin/update-fullfiletimelist -l /pub/fedora-secondary/update-fullfiletimelist.lock -t /pub fedora fedora-secondary
#15 1,14 * * * root TMPDIR=`mktemp -d /tmp/branched-modular.XXXXXX` && cd $TMPDIR && git clone https://pagure.io/pungi-fedora.git && cd pungi-fedora && git checkout f27 && LANG=en_US.UTF-8 ./nightly-modular.sh
diff --git a/roles/releng/files/docker-updates b/roles/releng/files/docker-updates
index 5aef2f0..6d704af 100644
--- a/roles/releng/files/docker-updates
+++ b/roles/releng/files/docker-updates
@@ -1,3 +1,7 @@
+#Fedora 28 Docker Updates nightly compose
+MAILTO=releng-cron(a)lists.fedoraproject.org
+45 5 * * * root TMPDIR=`mktemp -d /tmp/containerF28.XXXXXX` && pushd $TMPDIR && git clone -n https://pagure.io/pungi-fedora.git && cd pungi-fedora && git checkout f28 && LANG=en_US.UTF-8 ./container-nightly.sh RC-$(date "+\%Y\%m\%d").0 && popd && rm -rf $TMPDIR
+
# Fedora 27 Docker Updates nightly compose
MAILTO=releng-cron(a)lists.fedoraproject.org
45 7 * * * root TMPDIR=`mktemp -d /tmp/dockerF27.XXXXXX` && pushd $TMPDIR && git clone -n https://pagure.io/pungi-fedora.git && cd pungi-fedora && git checkout f27 && LANG=en_US.UTF-8 ./docker-nightly.sh RC-$(date "+\%Y\%m\%d").0 && popd && rm -rf $TMPDIR
@@ -5,7 +9,3 @@ MAILTO=releng-cron(a)lists.fedoraproject.org
# Fedora 26 Docker Updates nightly compose
MAILTO=releng-cron(a)lists.fedoraproject.org
45 6 * * * root TMPDIR=`mktemp -d /tmp/dockerF26.XXXXXX` && pushd $TMPDIR && git clone -n https://pagure.io/pungi-fedora.git && cd pungi-fedora && git checkout f26 && LANG=en_US.UTF-8 ./docker-nightly.sh RC-$(date "+\%Y\%m\%d").0 && popd && rm -rf $TMPDIR
-
-#Fedora 25 Docker Updates nightly compose
-MAILTO=releng-cron(a)lists.fedoraproject.org
-#45 5 * * * root TMPDIR=`mktemp -d /tmp/dockerF25.XXXXXX` && pushd $TMPDIR && git clone -n https://pagure.io/pungi-fedora.git && cd pungi-fedora && git checkout f25 && LANG=en_US.UTF-8 ./docker-nightly.sh RC-$(date "+\%Y\%m\%d").0 && popd && rm -rf $TMPDIR
diff --git a/roles/releng/files/twoweek-updates b/roles/releng/files/twoweek-updates
index 6f4cf94..290d5f3 100644
--- a/roles/releng/files/twoweek-updates
+++ b/roles/releng/files/twoweek-updates
@@ -1,6 +1,6 @@
#Fedora 28 two-week updates nightly compose
#MAILTO=releng-cron(a)lists.fedoraproject.org
-#15 8 * * * root TMPDIR=`mktemp -d /tmp/twoweekF28.XXXXXX` && pushd $TMPDIR && git clone -n https://pagure.io/pungi-fedora.git && cd pungi-fedora && git checkout f28 && LANG=en_US.UTF-8 ./twoweek-nightly.sh RC-$(date "+\%Y\%m\%d").0 && popd && rm -rf $TMPDIR
+15 8 * * * root TMPDIR=`mktemp -d /tmp/twoweekF28.XXXXXX` && pushd $TMPDIR && git clone -n https://pagure.io/pungi-fedora.git && cd pungi-fedora && git checkout f28 && LANG=en_US.UTF-8 ./twoweek-nightly.sh RC-$(date "+\%Y\%m\%d").0 && popd && rm -rf $TMPDIR
#Fedora 27 two-week updates nightly compose
MAILTO=releng-cron(a)lists.fedoraproject.org
@@ -13,3 +13,7 @@ MAILTO=releng-cron(a)lists.fedoraproject.org
#Fedora 27 CloudImage nightly compose
MAILTO=releng-cron(a)lists.fedoraproject.org
15 7 * * * root TMPDIR=`mktemp -d /tmp/CloudImageF27.XXXXXX` && pushd $TMPDIR && git clone -n https://pagure.io/pungi-fedora.git && cd pungi-fedora && git checkout f27 && LANG=en_US.UTF-8 ./cloud-nightly.sh RC-$(date "+\%Y\%m\%d").0 && popd && rm -rf $TMPDIR
+
+#Fedora 28 CloudImage nightly compose
+MAILTO=releng-cron(a)lists.fedoraproject.org
+15 6 * * * root TMPDIR=`mktemp -d /tmp/CloudF28.XXXXXX` && pushd $TMPDIR && git clone -n https://pagure.io/pungi-fedora.git && cd pungi-fedora && git checkout f28 && LANG=en_US.UTF-8 ./cloud-nightly.sh RC-$(date "+\%Y\%m\%d").0 && popd && rm -rf $TMPDIR
5 years, 11 months
Moving meeting time?
by Kevin Fenzi
Greetings.
It was noted recently that our current meeting time (thursdays at 18UTC)
is a bit late/poorly timed for several of our European colleagues.
Additionally, we sometimes have the go/no-go meeting at the same time
which can be inconvenient.
What would everyone think of moving the meeting to 16UTC?
Or is there a better time for anyone?
This weeks meeting we will keep the same, but we can discuss and see if
we want to move it starting next week.
Thanks,
kevin
5 years, 11 months
FBR - Fixing OSBS build
by Clement Verna
Currently OSBS builds are failing because of the kerberos
configuration not been up-to-date.
I would like to add the following to the osbs-playbook, this will make
sure that the buildroot container is rebuild using the latest
krb5.conf file.
+1 ?
diff --git a/files/osbs/buildroot-Dockerfile-production.j2
b/files/osbs/buildroot-Dockerfile-production.j2
index 70b556380..3ac044d32 100644
--- a/files/osbs/buildroot-Dockerfile-production.j2
+++ b/files/osbs/buildroot-Dockerfile-production.j2
@@ -2,7 +2,8 @@ FROM registry.fedoraproject.org/fedora
ADD ./infra-tags.repo /etc/yum.repos.d/infra-tags.repo
RUN dnf -y install --refresh dnf-plugins-core && dnf -y install
docker git python-setuptools e2fsprogs koji python-backports-lzma
osbs-client python-osbs-client gssproxy fedpkg python-docker-squash
atomic-reactor python-atomic-reactor* go-md2man
RUN dnf -y install --refresh python2-productmd python3-productmd
libmodulemd python2-gobject python3-gobject python2-modulemd
python3-modulemd python2-pdc-client python3-pdc-client
-RUN sed -i 's|.*default_ccache_name.*| default_ccache_name =
DIR:/tmp/ccache_%{uid}|g' /etc/krb5.conf
+ADD ./krb5.conf /etc
+RUN printf '[libdefaults]\n default_ccache_name =
DIR:/tmp/ccache_%{uid}' >/etc/krb5.conf.d/ccache.conf
ADD ./krb5.osbs_{{osbs_url}}.keytab /etc/
ADD ./ca.crt /etc/pki/ca-trust/source/anchors/osbs.ca.crt
RUN update-ca-trust
diff --git a/playbooks/groups/osbs-cluster.yml
b/playbooks/groups/osbs-cluster.yml
index 77d9a941c..4c09307ae 100644
--- a/playbooks/groups/osbs-cluster.yml
+++ b/playbooks/groups/osbs-cluster.yml
@@ -795,6 +795,14 @@
notify:
- buildroot container
+ - name: Upload krb5.conf for buildroot container
+ template:
+ src: "{{ ansible }}/roles/base/templates/krb5.conf.j2"
+ dest: "/etc/osbs/buildroot/krb5.conf"
+ mode: 0644
+ notify:
+ - buildroot container
+
- name: Upload internal CA for buildroot
copy:
src: "{{private}}/files/osbs/{{env}}/osbs-internal.pem"
5 years, 11 months
Freeze Break Request: more new sync changes
by Kevin Fenzi
Forgot the Everything dir in the last one:
> diff --git a/roles/bodhi2/backend/files/new-updates-sync b/roles/bodhi2/backend/files/new-updates-sync
> index 21600c7..fba2a3d 100755
> --- a/roles/bodhi2/backend/files/new-updates-sync
> +++ b/roles/bodhi2/backend/files/new-updates-sync
> @@ -33,9 +33,9 @@ RELEASES = {'f28': {'topic': 'fedora',
> {'ref': 'fedora/28/x86_64/workstation',
> 'dest': ATOMICDEST}],
> 'to': [{'arches': ['x86_64', 'armhfp', 'aarch64', 'source'],
> - 'dest': os.path.join(FEDORADEST, '28')},
> + 'dest': os.path.join(FEDORADEST, '28', 'Everything')},
> {'arches': ['i386', 'ppc64', 'ppc64le', 's390x'],
> - 'dest': os.path.join(FEDORAALTDEST, '28')}
> + 'dest': os.path.join(FEDORAALTDEST, '28', 'Everything')}
> ]},
> 'updates-testing': {
> 'from': 'f28-updates-testing',
+1s?
kevin
5 years, 11 months
Freeze Break Request: update new-updates-sync to sync f28 stable
updates
by Kevin Fenzi
We kinda need to sync f28 stable updates too:
> diff --git a/roles/bodhi2/backend/files/new-updates-sync b/roles/bodhi2/backend/files/new-updates-sync
> index 7cfe15e..21600c7 100755
> --- a/roles/bodhi2/backend/files/new-updates-sync
> +++ b/roles/bodhi2/backend/files/new-updates-sync
> @@ -32,7 +32,11 @@ RELEASES = {'f28': {'topic': 'fedora',
> # Hack around for the fact that ostree on f25 doesn't know links
> {'ref': 'fedora/28/x86_64/workstation',
> 'dest': ATOMICDEST}],
> - 'to': []},
> + 'to': [{'arches': ['x86_64', 'armhfp', 'aarch64', 'source'],
> + 'dest': os.path.join(FEDORADEST, '28')},
> + {'arches': ['i386', 'ppc64', 'ppc64le', 's390x'],
> + 'dest': os.path.join(FEDORAALTDEST, '28')}
> + ]},
> 'updates-testing': {
> 'from': 'f28-updates-testing',
> 'ostrees': [{'ref': 'fedora/28/%(arch)s/testing/atomic-host',
kevin
5 years, 11 months
FBR: Fix new-updates-sync typo
by Patrick Uiterwijk
Hi,
Can I get +1s for the following fix to my last version of the script?
Patrick
diff --git a/roles/bodhi2/backend/files/new-updates-sync
b/roles/bodhi2/backend/files/new-updates-sync
index b90c89384..7cfe15e5c 100755
--- a/roles/bodhi2/backend/files/new-updates-sync
+++ b/roles/bodhi2/backend/files/new-updates-sync
@@ -170,7 +170,8 @@ def sync_ostree(dst, ref):
if src_commit == dst_commit:
logger.info('OSTree at %s, ref %s in sync', dst, ref)
else:
- print('Syncing ostree ref %s -> %s' % (ref, src_commit, dst_commit))
+ print('Syncing ostree ref %s: %s -> %s'
+ % (ref, src_commit, dst_commit))
logger.info('Syncing OSTree to %s, ref %s: %s -> %s',
dst, ref, src_commit, dst_commit)
cmd = ['ostree', 'pull-local', '--verbose', '--repo',
5 years, 11 months
[PATCH] bodhi-pungi: make FAW and FAH use same versioning
by Dusty Mabe
We'll get nicer versions, like: 28.20180426.0
---
roles/bodhi2/backend/templates/pungi.rpm.conf.j2 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/roles/bodhi2/backend/templates/pungi.rpm.conf.j2 b/roles/bodhi2/backend/templates/pungi.rpm.conf.j2
index 287c03177..c058004df 100644
--- a/roles/bodhi2/backend/templates/pungi.rpm.conf.j2
+++ b/roles/bodhi2/backend/templates/pungi.rpm.conf.j2
@@ -148,7 +148,7 @@ ostree = {
[% if release.version_int >= 27 %]
{
[% if release.version_int >= 28 %]
- "version": "!OSTREE_VERSION_FROM_LABEL_DATE_TYPE_RESPIN",
+ "version": "!VERSION_FROM_VERSION_DATE_RESPIN",
[% endif %]
[% if release.version_int >= 28 %]
"treefile": "fedora-atomic-workstation-updates-[[ request.name ]].json",
--
2.14.3
5 years, 11 months
FBR for Bodhi F28 release status update
by Mohan Boddu
Now that we got a gold compose, we would like to change bodhi configs to reflect F28 GA changes.
There are some duplicates which doesn't make sense and hence removing them.
diff --git a/roles/bodhi2/base/templates/production.ini.j2 b/roles/bodhi2/base/templates/production.ini.j2
index f53e3aa..f146d3f 100644
--- a/roles/bodhi2/base/templates/production.ini.j2
+++ b/roles/bodhi2/base/templates/production.ini.j2
@@ -520,22 +520,15 @@ fedora_modular.mandatory_days_in_testing = 7
# critpath number of admin approvals, and the critpath minimum karma. For example, if we want to set
# Fedora 28 as a pre-beta, and we want it to have different rules in pre-beta and post-beta, we
# could do something like this:
-#f28.status = post_beta
-#f28.post_beta.mandatory_days_in_testing = 7
-#f28.post_beta.critpath.num_admin_approvals = 0
-#f28.post_beta.critpath.min_karma = 2
-#f28.post_beta.critpath.stable_after_days_without_negative_karma = 14
-#f28.pre_beta.mandatory_days_in_testing = 3
-#f28.pre_beta.critpath.num_admin_approvals = 0
-#f28.pre_beta.critpath.min_karma = 1
-f28.status = pre_beta
-f28.pre_beta.mandatory_days_in_testing = 3
-f28.pre_beta.critpath.num_admin_approvals = 0
-f28.pre_beta.critpath.min_karma = 1
+f28.status = post_beta
f28.post_beta.mandatory_days_in_testing = 7
-f28.post_beta.critpath.num_admin_approvals = 0
+f28.post_beta.critpath.num_admin_approvals = 1
f28.post_beta.critpath.min_karma = 2
f28.post_beta.critpath.stable_after_days_without_negative_karma = 14
+#f28.status = pre_beta
+#f28.pre_beta.mandatory_days_in_testing = 3
+#f28.pre_beta.critpath.num_admin_approvals = 0
+#f28.pre_beta.critpath.min_karma = 1
5 years, 11 months
FBR: Make new-updates-sync print what it did and email to releng-cron
by Patrick Uiterwijk
Any +1s?
From a4b55b290d475769c6cdb076d56fca762a0ed289 Mon Sep 17 00:00:00 2001
From: Patrick Uiterwijk <puiterwijk(a)redhat.com>
Date: Wed, 25 Apr 2018 21:53:17 +0200
Subject: [PATCH] Make new-updates-sync always print status and email to
releng-cron
Signed-off-by: Patrick Uiterwijk <puiterwijk(a)redhat.com>
---
roles/bodhi2/backend/files/new-updates-sync | 7 +++++++
roles/bodhi2/backend/files/new-updates-sync.cron | 3 +++
roles/bodhi2/backend/tasks/main.yml | 6 ++----
3 files changed, 12 insertions(+), 4 deletions(-)
create mode 100644 roles/bodhi2/backend/files/new-updates-sync.cron
diff --git a/roles/bodhi2/backend/files/new-updates-sync
b/roles/bodhi2/backend/files/new-updates-sync
index de6dca78c..b90c89384 100755
--- a/roles/bodhi2/backend/files/new-updates-sync
+++ b/roles/bodhi2/backend/files/new-updates-sync
@@ -170,6 +170,7 @@ def sync_ostree(dst, ref):
if src_commit == dst_commit:
logger.info('OSTree at %s, ref %s in sync', dst, ref)
else:
+ print('Syncing ostree ref %s -> %s' % (ref, src_commit, dst_commit))
logger.info('Syncing OSTree to %s, ref %s: %s -> %s',
dst, ref, src_commit, dst_commit)
cmd = ['ostree', 'pull-local', '--verbose', '--repo',
@@ -177,6 +178,7 @@ def sync_ostree(dst, ref):
out = run_command(cmd)
cmd = ['ostree', 'summary', '--verbose', '--repo', dst, '--update']
run_command(cmd)
+ print('Ostree ref %s now at %s' % (ref, dst_commit))
def update_fullfilelist(modules):
@@ -324,10 +326,15 @@ def sync_single_release(release):
if curstate and curstate == target:
logger.info('This repo has already been synced')
else:
+ print('Syncing %s %s from %s -> %s' % (release,
+ repo,
+ curstate,
+ target))
sync_single_repo(release, repo)
with open(curstatefile, 'w') as f:
f.write(target)
needssync = True
+ print('Synced %s %s to %s' % (release, repo, target))
for ostree in RELEASES[release]['repos'][repo].get('ostrees', []):
pairs = []
diff --git a/roles/bodhi2/backend/files/new-updates-sync.cron
b/roles/bodhi2/backend/files/new-updates-sync.cron
new file mode 100644
index 000000000..ec7955827
--- /dev/null
+++ b/roles/bodhi2/backend/files/new-updates-sync.cron
@@ -0,0 +1,3 @@
+MAILTO=releng-cron(a)lists.fedoraproject.org
+*/5 * * * * ftpsync /usr/local/bin/lock-wrapper updates-push
'/usr/local/bin/new-updates-sync'
+
diff --git a/roles/bodhi2/backend/tasks/main.yml
b/roles/bodhi2/backend/tasks/main.yml
index e33f710ff..ff5117710 100644
--- a/roles/bodhi2/backend/tasks/main.yml
+++ b/roles/bodhi2/backend/tasks/main.yml
@@ -268,10 +268,8 @@
- bodhi
- cron
-- name: Updates sync cron job.
- cron: name="updates-sync" minute="*/5" user="ftpsync"
- job="/usr/local/bin/lock-wrapper updates-push
'/usr/local/bin/new-updates-sync'"
- cron_file=updates-sync
+- name: Set the updates sync cron job
+ copy: src=new-updates-sync.cron dest=/etc/cron.d/updates-sync
when: inventory_hostname.startswith('bodhi-backend01') and env ==
"production"
tags:
- config
--
2.17.0
5 years, 11 months