Bug 1994830 - Silverblue cannot be updated using rpm-ostree
Summary: Silverblue cannot be updated using rpm-ostree
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: fedora-third-party
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Owen Taylor
QA Contact:
URL:
Whiteboard: AcceptedFreezeException
: 1997607 (view as bug list)
Depends On:
Blocks: F35BetaFreezeException
TreeView+ depends on / blocked
 
Reported: 2021-08-17 23:06 UTC by Lukas Ruzicka
Modified: 2021-08-30 21:42 UTC (History)
12 users (show)

Fixed In Version: fedora-third-party-0.6-1.fc35
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-08-30 21:42:00 UTC
Type: Bug


Attachments (Terms of Use)

Description Lukas Ruzicka 2021-08-17 23:06:28 UTC
Description of problem:

Silverblue Rawhide cannot be updated nor rebased using the rpm-ostree command.
It ends up with the following error:

error: Executing %transfiletriggerin for fedora-third-party: bwrap(/bin/sh): Child process killed by signal 1; run `journalctl -t 'rpm-ostree(fedora-third-party.transfiletriggerin)'` for more information

Version-Release number of selected component (if applicable):

rpm-ostree:
 Version: '2021.7'
 Git: 8f6533c34811d19be31a8bcd6fb986de4b5cee4b
 Features:
  - compose
  - rust
  - fedora-integration


How reproducible:

Always

Steps to Reproduce:
1. Run 'rpm-ostree update'

Actual results:

Update or rebase ends up with the above error.

Expected results:

Updates and rebasing should be possible without any issues.


Additional info:

Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]: Traceback (most recent call last):
Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]:   File "/usr/bin/fedora-third-party", line 33, in <module>
Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]:     sys.exit(load_entry_point('fedora-third-party==0.4', 'console_scripts', 'fedora-third-party')())
Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]:   File "/usr/lib/python3.10/site-packages/click/core.py", line 1137, in __call__
Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]:     return self.main(*args, **kwargs)
Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]:   File "/usr/lib/python3.10/site-packages/click/core.py", line 1062, in main
Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]:     rv = self.invoke(ctx)
Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]:   File "/usr/lib/python3.10/site-packages/click/core.py", line 1668, in invoke
Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]:     return _process_result(sub_ctx.command.invoke(sub_ctx))
Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]:   File "/usr/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]:     return ctx.invoke(self.callback, **ctx.params)
Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]:   File "/usr/lib/python3.10/site-packages/click/core.py", line 763, in invoke
Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]:     return __callback(*args, **kwargs)
Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]:   File "/usr/lib/python3.10/site-packages/click/decorators.py", line 84, in new_func
Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]:     return ctx.invoke(f, obj, *args, **kwargs)
Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]:   File "/usr/lib/python3.10/site-packages/click/core.py", line 763, in invoke
Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]:     return __callback(*args, **kwargs)
Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]:   File "/usr/lib/python3.10/site-packages/fedora_third_party/cli.py", line 111, in refresh
Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]:     repository.disable()
Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]:   File "/usr/lib/python3.10/site-packages/fedora_third_party/repository.py", line 53, in disable
Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]:     self.run_dnf(['config-manager', '--set-disabled', self.name])
Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]:   File "/usr/lib/python3.10/site-packages/fedora_third_party/repository.py", line 47, in run_dnf
Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]:     subprocess.check_call(command)
Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]:   File "/usr/lib64/python3.10/subprocess.py", line 364, in check_call
Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]:     retcode = call(*popenargs, **kwargs)
Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]:   File "/usr/lib64/python3.10/subprocess.py", line 345, in call
Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]:     with Popen(*popenargs, **kwargs) as p:
Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]:   File "/usr/lib64/python3.10/subprocess.py", line 965, in __init__
Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]:     self._execute_child(args, executable, preexec_fn, close_fds,
Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]:   File "/usr/lib64/python3.10/subprocess.py", line 1841, in _execute_child
Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]:     raise child_exception_type(errno_num, err_msg, err_filename)
Aug 18 00:31:21 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[9175]: FileNotFoundError: [Errno 2] No such file or directory: 'dnf'
Aug 18 00:32:40 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[10378]: Traceback (most recent call last):
Aug 18 00:32:40 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[10378]:   File "/usr/bin/fedora-third-party", line 33, in <module>
Aug 18 00:32:40 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[10378]:     sys.exit(load_entry_point('fedora-third-party==0.4', 'console_scripts', 'fedora-third-party')())
Aug 18 00:32:40 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[10378]:   File "/usr/lib/python3.10/site-packages/click/core.py", line 1137, in __call__
Aug 18 00:32:40 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[10378]:     return self.main(*args, **kwargs)
Aug 18 00:32:40 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[10378]:   File "/usr/lib/python3.10/site-packages/click/core.py", line 1062, in main
Aug 18 00:32:40 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[10378]:     rv = self.invoke(ctx)
Aug 18 00:32:40 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[10378]:   File "/usr/lib/python3.10/site-packages/click/core.py", line 1668, in invoke
Aug 18 00:32:40 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[10378]:     return _process_result(sub_ctx.command.invoke(sub_ctx))
Aug 18 00:32:40 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[10378]:   File "/usr/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
Aug 18 00:32:40 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[10378]:     return ctx.invoke(self.callback, **ctx.params)
Aug 18 00:32:40 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[10378]:   File "/usr/lib/python3.10/site-packages/click/core.py", line 763, in invoke
Aug 18 00:32:40 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[10378]:     return __callback(*args, **kwargs)
Aug 18 00:32:40 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[10378]:   File "/usr/lib/python3.10/site-packages/click/decorators.py", line 84, in new_func
Aug 18 00:32:40 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[10378]:     return ctx.invoke(f, obj, *args, **kwargs)
Aug 18 00:32:40 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[10378]:   File "/usr/lib/python3.10/site-packages/click/core.py", line 763, in invoke
Aug 18 00:32:40 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[10378]:     return __callback(*args, **kwargs)
Aug 18 00:32:40 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[10378]:   File "/usr/lib/python3.10/site-packages/fedora_third_party/cli.py", line 111, in refresh
Aug 18 00:32:40 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[10378]:     repository.disable()
Aug 18 00:32:40 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[10378]:   File "/usr/lib/python3.10/site-packages/fedora_third_party/repository.py", line 53, in disable
Aug 18 00:32:40 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[10378]:     self.run_dnf(['config-manager', '--set-disabled', self.name])
Aug 18 00:32:40 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[10378]:   File "/usr/lib/python3.10/site-packages/fedora_third_party/repository.py", line 47, in run_dnf
Aug 18 00:32:40 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[10378]:     subprocess.check_call(command)
Aug 18 00:32:40 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[10378]:   File "/usr/lib64/python3.10/subprocess.py", line 364, in check_call

Comment 1 Colin Walters 2021-08-18 00:37:44 UTC
Yeah, this is a pretty embarrassing bug.  In Fedora CoreOS we actually test the resulting ostree before shipping it to humans, because our build and test processes are integrated.  This isn't yet true of Silverblue or IoT.

I'm pretty sure Owen is looking at it.  In the meantime I'd guess you can `rpm-ostree override remove fedora-third-party`.  Or we could revert shipping it on rpm-ostree based systems until it's tested there.

Comment 2 Colin Walters 2021-08-18 13:35:42 UTC
I think more generally too, there is a fundamental clash here in that in the ostree model, we aim for two things:

- `/etc` is text files modified by humans or automation explicitly initiated by humans (e.g. ignition/ansible/puppet/etc.)
- `/usr` is owned by ostree, and conceptually all RPM/image stuff happens in `/usr`

You are trying to have stuff from the RPM/image side affect `/etc`.

Now of course, this *does* happen today with things like `ldconfig` which writes `/etc/ld.so.cache` - but that file is also not modified by humans.

So really, the more precise problem is you're trying to have RPM scripts change files that humans *do* edit.

Which introduces the possibility of data loss if a human is running `vi` on that file as the same time as an OS update.

(Just an aside related to this, in the ostree model, it is explicitly disallowed for RPM scripts to affect true user data in `/var`)

The ultimate fix here is to cleanly separate things so that we have e.g. /usr/lib/yum.repos.d and systemd-style masking like ln -s /dev/null /etc/yum.repos.d/fedora-thirdparty.repo to disable the repo.

Comment 3 Colin Walters 2021-08-18 13:52:36 UTC
And actually, while you *can* change files in `/etc` as part of a script, you can only change the *defaults*.  
IOW, as soon as someone edits one of the repo files (e.g. to change `baseurl`) any changes made by the fedora-third-party scripts will no longer take effect.

So ostree is preventing the "human edit vs OS update" concurrency issue here.

The hacky way to get out of this is to move it to a systemd unit as you're already doing, which doesn't fix any of these underlying issues - but it makes ostree not responsible =)

That said, systemd units are much more naturally under system administrator control, e.g. one can `systemctl disable` etc. that you can't with `%post` scripts.  So I'd consider switching to this model even for traditional-yum-rpm systems too.
The downside of that is it won't work in a non-systemd-container image though.

Comment 4 Luca BRUNO 2021-08-18 14:18:25 UTC
Which version of `fedora-third-party` is that?
It looks like the latest one may already have a fix for this: https://pagure.io/fedora-third-party/c/11803821f81b277e962b30a5015d51ebf5fd94f7?branch=main

Comment 5 Timothée Ravier 2021-08-18 14:22:38 UTC
https://src.fedoraproject.org/rpms/fedora-third-party > 0.5 hasn't been built yet

Comment 6 Óscar Fernández Díaz 2021-08-20 14:38:43 UTC
Hi, I have issues with fedora-third-party package and it's probably related to this issue (let me know if it's not):

Silverblue 35 cannot install anything, I haven't tried updating because I rebased from Silverblue 34 and it's already up-to-date.

It happens always.

Package versions:

fedora-third-party-0.5-1.fc35

rpm-ostree:
 Version: '2021.7'
 Git: 8f6533c34811d19be31a8bcd6fb986de4b5cee4b
 Features:
  - compose
  - rust
  - fedora-integration



Error:

error: Executing %transfiletriggerin for fedora-third-party: bwrap(/bin/sh): Child process killed by signal 1; run `journalctl -t 'rpm-ostree(fedora-third-party.transfiletriggerin)'` for more information

Traceback:

ago 20 13:59:16 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[8237]: Traceback (most recent call last):
ago 20 13:59:16 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[8237]:   File "/usr/bin/fedora-third-party", line 33, in <module>
ago 20 13:59:16 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[8237]:     sys.exit(load_entry_point('fedora-third-party==0.5', 'console_scripts', 'fedora-third-party')())
ago 20 13:59:16 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[8237]:   File "/usr/lib/python3.10/site-packages/click/core.py", line 1137, in __call__
ago 20 13:59:16 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[8237]:     return self.main(*args, **kwargs)
ago 20 13:59:16 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[8237]:   File "/usr/lib/python3.10/site-packages/click/core.py", line 1062, in main
ago 20 13:59:16 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[8237]:     rv = self.invoke(ctx)
ago 20 13:59:16 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[8237]:   File "/usr/lib/python3.10/site-packages/click/core.py", line 1668, in invoke
ago 20 13:59:16 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[8237]:     return _process_result(sub_ctx.command.invoke(sub_ctx))
ago 20 13:59:16 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[8237]:   File "/usr/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
ago 20 13:59:16 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[8237]:     return ctx.invoke(self.callback, **ctx.params)
ago 20 13:59:16 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[8237]:   File "/usr/lib/python3.10/site-packages/click/core.py", line 763, in invoke
ago 20 13:59:16 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[8237]:     return __callback(*args, **kwargs)
ago 20 13:59:16 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[8237]:   File "/usr/lib/python3.10/site-packages/click/decorators.py", line 84, in new_func
ago 20 13:59:16 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[8237]:     return ctx.invoke(f, obj, *args, **kwargs)
ago 20 13:59:16 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[8237]:   File "/usr/lib/python3.10/site-packages/click/core.py", line 763, in invoke
ago 20 13:59:16 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[8237]:     return __callback(*args, **kwargs)
ago 20 13:59:16 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[8237]:   File "/usr/lib/python3.10/site-packages/fedora_third_party/cli.py", line 115, in refresh
ago 20 13:59:16 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[8237]:     cfg.update_seen_repositories()
ago 20 13:59:16 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[8237]:   File "/usr/lib/python3.10/site-packages/fedora_third_party/config.py", line 53, in update_seen_repositories
ago 20 13:59:16 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[8237]:     self._write_state()
ago 20 13:59:16 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[8237]:   File "/usr/lib/python3.10/site-packages/fedora_third_party/config.py", line 44, in _write_state
ago 20 13:59:16 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[8237]:     with open(self.state_path, 'w') as f:
ago 20 13:59:16 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[8237]: FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/fedora-third-party/state'
ago 20 16:17:13 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[31103]: Traceback (most recent call last):
ago 20 16:17:13 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[31103]:   File "/usr/bin/fedora-third-party", line 33, in <module>
ago 20 16:17:13 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[31103]:     sys.exit(load_entry_point('fedora-third-party==0.5', 'console_scripts', 'fedora-third-party')())
ago 20 16:17:13 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[31103]:   File "/usr/lib/python3.10/site-packages/click/core.py", line 1137, in __call__
ago 20 16:17:13 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[31103]:     return self.main(*args, **kwargs)
ago 20 16:17:13 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[31103]:   File "/usr/lib/python3.10/site-packages/click/core.py", line 1062, in main
ago 20 16:17:13 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[31103]:     rv = self.invoke(ctx)
ago 20 16:17:13 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[31103]:   File "/usr/lib/python3.10/site-packages/click/core.py", line 1668, in invoke
ago 20 16:17:13 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[31103]:     return _process_result(sub_ctx.command.invoke(sub_ctx))
ago 20 16:17:13 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[31103]:   File "/usr/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
ago 20 16:17:13 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[31103]:     return ctx.invoke(self.callback, **ctx.params)
ago 20 16:17:13 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[31103]:   File "/usr/lib/python3.10/site-packages/click/core.py", line 763, in invoke
ago 20 16:17:13 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[31103]:     return __callback(*args, **kwargs)
ago 20 16:17:13 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[31103]:   File "/usr/lib/python3.10/site-packages/click/decorators.py", line 84, in new_func
ago 20 16:17:13 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[31103]:     return ctx.invoke(f, obj, *args, **kwargs)
ago 20 16:17:13 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[31103]:   File "/usr/lib/python3.10/site-packages/click/core.py", line 763, in invoke
ago 20 16:17:13 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[31103]:     return __callback(*args, **kwargs)
ago 20 16:17:13 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[31103]:   File "/usr/lib/python3.10/site-packages/fedora_third_party/cli.py", line 115, in refresh
ago 20 16:17:13 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[31103]:     cfg.update_seen_repositories()
ago 20 16:17:13 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[31103]:   File "/usr/lib/python3.10/site-packages/fedora_third_party/config.py", line 53, in update_seen_repositories
ago 20 16:17:13 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[31103]:     self._write_state()
ago 20 16:17:13 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[31103]:   File "/usr/lib/python3.10/site-packages/fedora_third_party/config.py", line 44, in _write_state
ago 20 16:17:13 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[31103]:     with open(self.state_path, 'w') as f:
ago 20 16:17:13 fedora rpm-ostree(fedora-third-party.transfiletriggerin)[31103]: FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/fedora-third-party/state'

Comment 7 Óscar Fernández Díaz 2021-08-20 17:33:44 UTC
I can confirm that the error only occurs when installing, not when updating. Also, sorry for the duplicate traceback above.

Comment 8 Jonathan Lebon 2021-08-25 15:34:34 UTC
*** Bug 1997607 has been marked as a duplicate of this bug. ***

Comment 9 jaypeedaylee 2021-08-25 16:43:57 UTC
Just to add, trying to `rpm-ostree override remove fedora-third-party` will get you an error since the fedora workstation repositories depend on it.

Comment 10 Owen Taylor 2021-08-26 17:41:44 UTC
Sorry that I didn't see this earlier.

(In reply to Óscar Fernández Díaz from comment #7)
> I can confirm that the error only occurs when installing, not when updating.
> Also, sorry for the duplicate traceback above.

It's actually not a duplicate traceback - it shows what happens in particular with the newer 0.5 version, which doesn't use dnf.

I'm unclear on the exact details of the environment where rpm-ostee is running triggers, but I should be able to update the code in a way that will be pretty robust against this - if the system looks "fresh" - there's no /var/lib/fedora-third-party state', then 'fedora-third-party refresh' should exit immediately.

The other approach would be to make the trigger detect that it's running in the rpm-ostree scripts environment explicity, but I'm not sure how to do that robustly, and the fedora-third-party change is more general.

(In reply to Colin Walters from comment #3)
> And actually, while you *can* change files in `/etc` as part of a script,
> you can only change the *defaults*.  
> IOW, as soon as someone edits one of the repo files (e.g. to change
> `baseurl`) any changes made by the fedora-third-party scripts will no longer
> take effect.
> 
> So ostree is preventing the "human edit vs OS update" concurrency issue here.

I'm not particularly worried about the race condition in this particular case - in the traditional model - the 'fedora-third-party refresh' script only affects newly installed repository files, so a user would need to be editing one of those before the RPM transaction finishes. In the rpm-ostree case, the trigger needs to do nothing, since it is never supposed to do anything on a freshly installed system.
 
> The hacky way to get out of this is to move it to a systemd unit as you're
> already doing, which doesn't fix any of these underlying issues - but it
> makes ostree not responsible =)

I don't really anticipate problems with users editing things at boot time, but I definitely agree that having the enablement status of repositories as editing a %config(noreplace) file in /etc is *not* the best way to do it, for a number of reasons. The biggest problem I see is that we can't update the repository files once they've been "edited" to turn them on, so if an URL changes or something, we'll have an issue.
 
> That said, systemd units are much more naturally under system administrator
> control, e.g. one can `systemctl disable` etc. that you can't with `%post`
> scripts.  So I'd consider switching to this model even for
> traditional-yum-rpm systems too.
> The downside of that is it won't work in a non-systemd-container image
> though.

Also, if people are updating the system live (not at boot time) the opt-in status won't be applied until the next reboot, which would definitely be confusing.

Comment 11 Fedora Update System 2021-08-26 18:29:04 UTC
FEDORA-2021-b1b449aa6a has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-b1b449aa6a

Comment 12 Owen Taylor 2021-08-26 18:30:27 UTC
Requesting a F35 Beta Freeze Exception, so that we can get F35 Silverblue working again as quickly as possible.

Comment 13 Fedora Update System 2021-08-26 19:50:45 UTC
FEDORA-2021-b1b449aa6a has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-b1b449aa6a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-b1b449aa6a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 14 Adam Williamson 2021-08-30 15:44:03 UTC
+3 in https://pagure.io/fedora-qa/blocker-review/issue/413 (counting bcotton as implicitly +1 BetaFE), so marking accepted FE.

Comment 15 Fedora Update System 2021-08-30 21:42:00 UTC
FEDORA-2021-b1b449aa6a has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.