Commit Graph

1856 Commits

Author SHA1 Message Date
Brian C. Lane
824c84ae2f Use the first enabled system repo for the test
(cherry picked from commit 3fd5e50c80)
2018-08-07 12:12:17 -07:00
Brian C. Lane
2a04eb88ad Show more details when the system repo delete test fails
Works fine for me locally, but not in Travis for some reason so let's
get more info.

(cherry picked from commit 26df083bd4)
2018-08-07 12:12:17 -07:00
Brian C. Lane
2283adcba7 Add composer-cli function tests
These depend on there being a freshly installed lorax-composer API
server running, if there is no /run/weldr/api.socket they will be
skipped.

(cherry picked from commit 7700ae3135)
2018-08-07 12:12:17 -07:00
Brian C. Lane
e6845cc782 Add a test library
This adds empty __init__.py to tests so that a lib.py library of helper
functions can be imported from the tests.

Add captured_output to use with composer-cli tests to capture stdout/err
output from the functions.

(cherry picked from commit eeae331ba0)
2018-08-07 12:12:17 -07:00
Brian C. Lane
f791d5aff6 composer-cli: Add support for Group to blueprints diff
(cherry picked from commit 2edd7a995b)
2018-08-07 12:12:17 -07:00
Brian C. Lane
5af7ad6600 Update status.py to use new handle_api_result
Use the new function to properly handle error responses for all the
commands.

(cherry picked from commit 642f117d54)
2018-08-07 12:12:17 -07:00
Brian C. Lane
926d88a3bd Update sources.py to use new handle_api_result
Use the new function to properly handle error responses for all the
commands.

(cherry picked from commit 3205e47a13)
2018-08-07 12:12:17 -07:00
Brian C. Lane
7e999cc9c6 Update projects.py to use new handle_api_result
Use the new function to properly handle error responses for all the
commands.

(cherry picked from commit 77767cd93a)
2018-08-07 12:12:17 -07:00
Brian C. Lane
ecefa18110 Update modules.py to use new handle_api_result
Use the new function to properly handle error responses for all the
commands.

(cherry picked from commit b55b86d0b3)
2018-08-07 12:12:17 -07:00
Brian C. Lane
92f5860182 Update compose.py to use new handle_api_result
Use the new function to properly handle error responses for all the
commands.

(cherry picked from commit 760aeb61a7)
2018-08-07 12:12:17 -07:00
Brian C. Lane
e21c53f507 Update blueprints.py to use new handle_api_result
Use the new function to properly handle error responses for all the
commands.

(cherry picked from commit c1c5536ec8)
2018-08-07 12:12:17 -07:00
Brian C. Lane
85b2807a15 Modify handle_api_result so it can be used in more places
Some results have errors and no status, others have status and errors.
Update the function to return the final rc to exit with, and a bool
indicating whether or not to continue processing the other fields.

Add a bunch of tests for the new function to make sure I have the logic
correct.

(cherry picked from commit 35fa067219)
2018-08-07 12:12:17 -07:00
Brian C. Lane
ac6f6f6a80 Automatic commit of package [lorax] release [28.14.3-1].
Created by command:

/usr/bin/tito tag
2018-07-30 08:32:33 -07:00
Brian C. Lane
619026ff3d Update to use only qemu-kvm
We only have qemu-kvm available, so use that. This also means that there
will not me any support for using qemu with arches that are different
from the host.
2018-07-27 15:10:22 -07:00
Chris Lumens
c3987cc4cb Fix help output on the compose subcommand.
(cherry picked from commit a3572c9fdd)
2018-07-26 14:53:57 -04:00
Chris Lumens
db98df8373 Add timestamps to "compose-cli compose status" output.
(cherry picked from commit 7bcb61849d)
2018-07-26 14:53:53 -04:00
Chris Lumens
5ff96bc627 And then add real output to the status command.
(cherry picked from commit eb0939d967)
2018-07-26 14:53:50 -04:00
Chris Lumens
c6efcd1fc2 Add the beginnings of a new status subcommand.
(cherry picked from commit 9eafc60fa0)
2018-07-26 14:53:47 -04:00
Brian C. Lane
4b8211a471 composer-cli: Fix non-zero epoch in projets info
The json value is an int, so convert it to a str.

(cherry picked from commit 18521cec1a)
2018-07-25 11:39:55 -07:00
Brian C. Lane
2f76700926 Adjust test_server and test blueprints so they depsolve 2018-07-24 14:53:04 -07:00
Brian C. Lane
fab8c0786d Automatic commit of package [lorax] release [28.14.2-1].
Created by command:

/usr/bin/tito tag
2018-07-20 16:27:40 -07:00
Brian C. Lane
22094b26b7 New lorax documentation - 28.14.2 2018-07-20 16:27:17 -07:00
Brian C. Lane
63cc38bfdd Add dnf.transaction to list of modules for sphinx to ignore
(cherry picked from commit 0ff9a674ca)
2018-07-20 16:26:36 -07:00
Chris Lumens
e00bb491a6 Document that you shouldn't run lorax-composer twice.
(cherry picked from commit 052828047c)
2018-07-20 16:14:23 -07:00
Chris Lumens
10e51ce2bd Add PIDFile to the .service file.
This will cause systemd to delete the lock file when the service
terminates.  This does not do anything if lorax-composer is started on
the command line, however.

(cherry picked from commit e37eae55b8)
2018-07-20 16:14:23 -07:00
Radek Vykydal
9196f4b92a Don't activate default auto connections after switchroot
Resolves: rhbz#1555934

Add NetworkManager config file turning default auto connections off.
2018-07-20 09:15:44 -07:00
Brian C. Lane
1e4ac3eb5e Use system-logos in live-iso.ks 2018-07-19 12:00:05 -07:00
Brian C. Lane
6c34a17237 Update rsync version in http-server.toml
(cherry picked from commit b0b97adf75)
2018-07-19 11:01:58 -07:00
Brian C. Lane
d50321239c Log and exit on metadata update errors at startup
A bad system repo can cause lorax-composer to fail to start. Instead of
a traceback log the error and exit.

(note that the exit still results in an OSError traceback due to part of
it running as root, this needs to be addressed in another commit).

(cherry picked from commit 49380b4b49)
2018-07-19 11:01:08 -07:00
Brian C. Lane
ea5e34e9c6 Check /projects responses for null values.
Some values can be null/None so check for that instead of crashing.

(cherry picked from commit de0e5d2b59)
2018-07-19 11:00:58 -07:00
Brian C. Lane
9e3469b354 Clarify error message from /source/new
(cherry picked from commit 5993802bc6)
2018-07-19 11:00:54 -07:00
Chris Lumens
67b4a6c1eb Support loading groups from the kickstart template files.
(cherry picked from commit 1de67f4f63)
2018-07-19 11:00:46 -07:00
Chris Lumens
22ddaa667e Include groups in depsolving.
This adds a new argument to projects_depsolve and
projects_depsolve_with_size that contains the group list, unfortunately.
I would have prefered adding a function that just returns a list of all
the contents of a group and then add that to what was being passed into
projects_depsolve.  However, there does not appear to be any good way to
do that in yum aside from a lot of grubbing around in the comps object,
which I am unwilling to do.

(cherry picked from commit 0259f3564d)
2018-07-19 11:00:16 -07:00
Chris Lumens
76c811b7b8 Add help output to each subcommand.
This is the same as the output at the top level, just trimmed down to
only the options for a single subcommand.  It's trigged by providing
"help" or "--help" as a subcommand option.

(cherry picked from commit f5115291bd)
2018-07-19 10:59:45 -07:00
Chris Lumens
cd5c9385f6 Split the help output into its own module.
This means I can reuse it for help output for individual subcommands.

(cherry picked from commit 0179a976ba)
2018-07-19 10:59:38 -07:00
Chris Lumens
eca6a01008 If the help subcommand is given, print the help output.
This isn't a real subcommand like the others.  The option processing
just intercepts it and prints the output.  Given that we're subcommand
based, it makes sense to support this in addition to --help.

(cherry picked from commit 18620700fd)
2018-07-19 10:59:31 -07:00
Brian C. Lane
f05a95ebe5 Automatic commit of package [lorax] release [28.14.1-1].
Created by command:

/usr/bin/tito tag
2018-07-18 10:07:23 -07:00
Brian C. Lane
5b83da690e Add requires on lorax-templates-rhel
Also switch to using the %{buildroot} macro and %autosetup
2018-07-18 10:06:06 -07:00
Brian C. Lane
3f054d6a3a Check the compose templates at startup
Depsolve the packages included in the templates and report any errors
using the /api/status 'msgs' field. This should help narrow down
problems with package sources not being setup correctly.

(cherry picked from commit d92f2f5b04)
2018-07-13 10:17:08 -07:00
Adam Williamson
bbd2e7b4ca Install 'hostname' in runtime-install (for iSCSI)
As explained in detail in the bug, 'hostname' must be installed
for the dracut 95iscsi module to work (and thus for key iscsi
modules to be included in the initramfs generated by lorax). Up
till recently, we got it as a dependency of initscripts, but
when network-scripts split from initscripts, the dependency went
with it. Now nothing else pulls it in as a dep, so let's just
pull it in explicitly here.

Resolves: rhbz#1599183

Signed-off-by: Adam Williamson <awilliam@redhat.com>
(cherry picked from commit 7f805287ca)
2018-07-09 10:06:24 -07:00
Brian C. Lane
1ce6279ad6 Fix a couple typos in lorax-composer docs.
The description of blueprint versions was wrong, now it is
correct.

(cherry picked from commit 9e41052992)
2018-06-29 14:17:25 -07:00
Brian C. Lane
38bd2bbe95 Require python3-dnf v3.0.0 or later 2018-06-28 16:22:07 -07:00
Adam Williamson
6b8009ce8f DNF 3: progress callback constants moved to dnf.transaction
Signed-off-by: Adam Williamson <awilliam@redhat.com>
(cherry picked from commit 4a3f9e12aa)
2018-06-28 16:20:26 -07:00
Brian C. Lane
7c364d297b Include example blueprints in the rpm
This also sets ownership of /var/lib/lorax/composer/ to root:weldr to
allow missing directories to be created at runtime.

(cherry picked from commit f38f5cc168)
2018-06-27 16:14:47 -07:00
Brian C. Lane
48fa5cf415 Make sure /run/weldr has correct ownership and permissions
Normally tmpfiles.d will handle this at boot time, but if you install
lorax-composer without rebooting it was ending up with root:root
ownership instead of root:weldr

(cherry picked from commit 7adc5162fb)
2018-06-27 16:14:47 -07:00
Brian C. Lane
ba8e478eed Allow more than 1 bash build in tests
It is perfectly valid to have more than one build of a package, eg. one
in the release repo and one in the updates repo.

(cherry picked from commit 86c4ef5f45)
2018-06-21 16:35:48 -07:00
Brian C. Lane
089f0309fa Add redhat.exec to s390 .treeinfo
Resolves: rhbz#1593657
(cherry picked from commit 6d9187d559)
2018-06-21 11:23:30 -07:00
Brian C. Lane
9192454ffe Automatic commit of package [lorax] release [28.14.0-1].
Created by command:

/usr/bin/tito tag --keep-version
2018-06-07 09:51:17 -07:00
Brian C. Lane
760d70f158 Automatic commit of package [lorax] release [28.14-1].
Created by command:

/usr/bin/tito tag
2018-06-07 09:18:26 -07:00
Brian C. Lane
e1088fe6e9 New lorax documentation - 28.14 2018-06-07 09:18:10 -07:00