Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rhel7 backports #190

Merged
merged 9 commits into from Jul 10, 2015
Merged

rhel7 backports #190

merged 9 commits into from Jul 10, 2015

Conversation

wgwoods
Copy link
Contributor

@wgwoods wgwoods commented Jul 8, 2015

This is the commits from #181 and #182, backported for rhel7. The differences are minor but just barely enough to make me want another quick review.

The differences from the above commits are:

  • 231ac70: also reverts a66cb15
  • 99c97dd: dnfpayload vs. yumpayload; the fix is the same, it's just in a different file.
  • d844db8: resolve some parse-kickstart conflicts - commands.network.RHEL7_Network vs. commands.network.F22_Network, etc.
  • faf2432: resolve conflict in dracut/module-setup.sh: RHEL7 doesn't have PYTHONHASHSEED=42
  • 679448a: RHEL7 handles chronyd and ntpd; rather than checking to see if the files exist, just try to modify them - the worst that can happen (AFAICT) is a warning in the log. NBD.

@bcl
Copy link
Contributor

bcl commented Jul 9, 2015

Looks good, tested with a new boot.iso using iso and pxe boot and minimal kickstart.

The only hitch is the Related lines need to have lower case rhbz.

Okay so: commit 4883b96 moved fetch-kickstart-net.sh from the online
hook into initqueue (or initqueue/settled) to fix inst.ks.sendmac.

So when you boot with inst.ks=[URL], the order goes:

1. Network comes up
2. Run `online` hook
   * Schedule kickstart fetch in initqueue
   * Other online tasks from boot args (e.g. updates)
3. Run `initqueue`
   * fetch + run kickstart
     * add `anaconda-netroot.sh` (etc.) to `online` hook
     * `udevadm trigger` disk devices
     * `udevadm trigger` net devices

The problem is, triggering network devices is *not* sufficient to re-run
the `online` hook - this only happens when the NIC actually gets
_configured_, not when the device is triggered.

The fix is pretty straightforward: re-run the `online` hook for active
NICs after we run the kickstart, in order to pick up any new tasks that
the kickstart might have scheduled.

Resolves: rhbz#1238987
Reverts: a66cb15
If the user specified some NTP servers, write them to the configfiles,
regardless of whether the service(s) are actually enabled.

(Maybe you want to configure it now but turn it on later? I dunno, man.)

Resolves: rhbz#1197575
addDriverRepos needs to happen before gatherRepoMetadata, otherwise we
don't gather its metadata.

Related: rhbz#1084197
This commit adds a new, rewritten `driver_updates.py`, along with some
driverdisk tests.

It also adds `tests/lib/mkdud.py`, which is a helper tool for making
driver disk images.

Related: rhbz#1084197
No substantive code changes here. Just some comments, some pylint
directives, and an abstract mixin class so the extra arguments to
dracut_args() don't look unused.

Related: rhbz#1084197
The fancy handling here is only needed because of the truly messed-up
way we were handling "inst.dd" compared to every other boot arg.

Fixing driverdisk handling makes this unnecessary.

Related: rhbz#1084197
Here's where we actually modify stuff to use `driver_updates.py`:

* Parse commandline options to /tmp/dd_{net,disk,interactive,todo}
* Generate udev rules etc. in `driver-updates-genrules.sh`
* `fetch-driver-net.sh`: fetch .iso file and call driver-updates
* Modify `driver-updates@.service`:
  * Use `dmesg -n1` and `/proc/sys/kernel/printk` to hide console messages
  * Make sure we run after vconsole is set up
  * Use `plymouth --hide-splash` rather than `plymouth quit`
    (this is how dracut handles emergency shells)
* Drop `driver-updates.sh` (which ran driver-updates in `pre-trigger`)
* Drop `driver-updates-net.sh` (`driver_updates.py` handles saving repos)
* Drop old `driver-updates`
* Make necessary changes to `Makefile.am` and `module-setup.sh`
* Add `dracut/test_*.py` to `nosetests.sh`
* `anaconda-lib.sh`: Add `wait_for_dd`, remove `start_driver_update`,
                     fix `run_kickstart` for the new stuff above

Resolves: rhbz#1084197
Resolves: rhbz#1164131
Related: rhbz#1213546
- use constant for ANACONDAVER

- rename constants to uppercase
  (ARCH, KERNELVER, MODULE_UPDATES_DIR, FIRMWARE_UPDATES_DIR)

- extract_drivers(): explicitly refuse to be called with drivers=..
  and repos=.. so we don't construct a temporary list

- add list_drivers(), use that wherever we were doing
  [d for r in repos for d in dd_list(r)]

- read_lines(): refactor and add comment to be clearer about what it's doing,
  add unit test

- DeviceInfo.shortdev: use os.path.realpath instead of manually
  resolving symlinks, add comment about why we don't use basename(),
  add unit test

- Add extra explanatory comments

- TextMenu.format_header(): use 4*' ' instead of '    '

- Move test_driver_updates.py to tests/dracut_tests/

- Fix ExtractDriversTestCase trying to create /updates

Related: rhbz#1084197
parse-anaconda-dd.sh was creating an (empty) /tmp/dd_todo if there was
nothing to do, but that tricked driver-updates-genrules.sh into thinking
there *was* something to do, so we time out waiting for the dd stuff to
finish.

This patch fixes that by ensuring the file is only created if there is
actually one or more tasks to complete.

Related: rhbz#1084197
@wgwoods
Copy link
Contributor Author

wgwoods commented Jul 9, 2015

:%s/RHBZ#/rhbz#/

bcl added a commit that referenced this pull request Jul 10, 2015
@bcl bcl merged commit d553adb into rhinstaller:rhel7-branch Jul 10, 2015
@wgwoods wgwoods deleted the rhel7-backports branch July 13, 2015 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants