Torstein Husebø
cc98b3025e
treewide: fix multiple typos
2015-01-26 10:39:47 -05:00
Zbigniew Jędrzejewski-Szmek
56b921c3d8
machinectl: fix typo
2015-01-24 21:11:45 -05:00
Lennart Poettering
7079cfeffb
importd: when listing transfers, show progress percentage
...
With this change the pull protocol implementation processes will pass
progress data to importd which then passes this information on via the
bus. We use sd_notify() as generic transport for this communication,
making importd listen to them, while matching the incoming messages to
the right transfer.
2015-01-23 01:17:55 +01:00
Lennart Poettering
56e6c2abb8
machinectl: fix handling of --verify= argument for dkr downloads
2015-01-23 01:17:55 +01:00
Lennart Poettering
6adf7b5e46
machinectl: when downloading an image, clarify that C-c will not cancel the download, but continue it in the background
2015-01-22 17:50:50 +01:00
Lennart Poettering
813c65c34b
machinectl: minor simplification
2015-01-22 17:50:50 +01:00
Lennart Poettering
6e18cc9fa0
machinectl: parse verify setting client-side
2015-01-22 17:50:50 +01:00
Lennart Poettering
b5b38b41c3
machinectl: various minor updates to the --help text
2015-01-22 15:14:36 +01:00
Lennart Poettering
7f444afa1b
import: rename --verify=sum to --verify=checksum
...
This is how we call it internally, and also a bit more descriptive.
2015-01-22 15:14:36 +01:00
Lennart Poettering
3d7415f43f
import: introduce new mini-daemon systemd-importd, and make machinectl a client to it
...
The old "systemd-import" binary is now an internal tool. We still use it
as asynchronous backend for systemd-importd. Since the import tool might
require some IO and CPU resources (due to qcow2 explosion, and
decompression), and because we might want to run it with more minimal
priviliges we still keep it around as the worker binary to execute as
child process of importd.
machinectl now has verbs for pulling down images, cancelling them and
listing them.
2015-01-22 04:02:07 +01:00
Lennart Poettering
c19de71113
machined: refer to the disk space allocated for an image to "usage" rather than "size"
...
After all, it's closer to the "du"-reported value than to the file
sizes...
2015-01-19 20:24:09 +01:00
Lennart Poettering
bb4a228207
machinectl: fix minor memory leak
2015-01-14 23:18:33 +01:00
Cristian Rodríguez
d538bfc713
machinectl: use GNU basename, not the XPG version
2015-01-13 18:27:49 -05:00
Lennart Poettering
f7621db0e3
loginctl: port to generic verbs.h API
2015-01-08 23:13:45 +01:00
Lennart Poettering
e45fc5e738
man: bring machinectl man page up-to-date
2015-01-08 23:13:45 +01:00
Lennart Poettering
079dac08c6
systemctl,loginctl: start polkit agent for all polkit enabled operations
2015-01-08 23:13:45 +01:00
Lennart Poettering
acf97e213e
machinectl: given that machinectl invokes a number of polkit enabled methods, start the polkit agent on terminals
2015-01-08 23:13:45 +01:00
Lennart Poettering
8b0cc9a36c
machinectl: show most recent log output in "machinectl status", too
2015-01-08 23:13:45 +01:00
Lennart Poettering
0b63e2789f
machinectl: prettify "machinectl list" output
2015-01-07 19:32:42 +01:00
Lennart Poettering
da054c3782
ptyfwd: simplify how we handle vhangups a bit
2015-01-07 14:47:10 +01:00
Lennart Poettering
0ec5543c4c
machinectl: make sure that "machinectl login" exits immediately when the machine it is connected to dies
2015-01-07 03:08:00 +01:00
Lennart Poettering
8246dff1f8
machinectl: remove spurious newline
2015-01-05 13:47:03 +01:00
Thomas Hindoe Paaboel Andersen
9a14fb6285
machinectl: Check type instead of path before printing the type
...
Looks like a typo when introduced in fefdc04b38
2015-01-02 21:38:22 +01:00
David Herrmann
06a079055a
machinectl: remove dead code
...
'r' is not touched after the previous error-checking 100 lines above. Drop
that code.
2014-12-31 15:52:23 +01:00
Lennart Poettering
d8f52ed25a
machinectl: add "enable" and "disable" verbs for enabling/disabling systemd-nspawn for containers
...
This is basically just a shortcut for "systemctl enable
systemd-nspawn@<foobar>.service", but does escaping.
2014-12-29 17:00:05 +01:00
Lennart Poettering
ebd011d95b
machinectl: add new "start" verb to start a container as a service in nspawn
2014-12-29 17:00:05 +01:00
Lennart Poettering
b6b1849830
machined: add support for reporting image size via btrfs quota
2014-12-28 02:08:40 +01:00
Lennart Poettering
ebd93cb684
machinectl/machined: implement "rename", "clone", "read-only" verbs for machine images
2014-12-28 02:08:40 +01:00
Lennart Poettering
086821244b
machined: add "machinectl remove" for removing images
2014-12-28 02:08:40 +01:00
Lennart Poettering
fefdc04b38
machinectl: add status commands
2014-12-26 20:12:40 +01:00
Lennart Poettering
8937e7b689
machinectl: mark read-only images when listing in red
2014-12-26 19:33:15 +01:00
Lennart Poettering
6389e747d5
machinectl: left-align times
2014-12-26 19:21:58 +01:00
Lennart Poettering
10f9c75519
machined: beef up machined image listing with creation/modification times of subvolumes
...
We make use of the btrfs subvol crtime for this, and for gpt images of a
manually managed xattr, if we can.
2014-12-25 03:19:19 +01:00
Lennart Poettering
de33fc6257
sd-bus: rename sd_bus_open_system_container() to sd_bus_open_system_machine()
...
Pretty much everywhere else we use the generic term "machine" when
referring to containers in API, so let's do though in sd-bus too. In
particular, since the concept of a "container" exists in sd-bus too, but
as part of the marshalling system.
2014-12-24 16:53:04 +01:00
Lennart Poettering
d04c1fb8e2
machined: introduce polkit for OpenLogin() call
...
This way "machinectl login" can be opened up to run without privileges.
2014-12-23 21:28:48 +01:00
Lennart Poettering
bf441e3d93
machinectl: rework 'machinectl login' to use OpenMachineLogin()
2014-12-23 19:15:27 +01:00
Lennart Poettering
ee451d766a
systemd-run: support -t mode when combined with -M
...
For that, ask machined for a container PTY and use that.
2014-12-23 03:26:24 +01:00
Lennart Poettering
40205d706e
machined: add OpenMachinePTY() bus call for allocating a PTY device within a container
...
Then, port "machinectl" over to make use of it.
2014-12-23 03:26:24 +01:00
Lennart Poettering
c7b7d4493a
machinectl,nspawn: don't print extra final newline if pty terminal output was newline-terinated anyway
2014-12-23 03:26:24 +01:00
Lennart Poettering
9b15b7846d
run: add a new "-t" mode for invoking a binary on an allocated TTY
2014-12-23 03:26:24 +01:00
Lennart Poettering
56159e0d91
machinectl: port machinectl to new verbs logic
2014-12-19 19:19:29 +01:00
Lennart Poettering
cd61c3bfd7
machined/machinectl: add logic to show list of available images
...
This adds a new bus call to machined that enumerates /var/lib/container
and returns all trees stored in it, distuingishing three types:
- GPT disk images, which are files suffixed with ".gpt"
- directory trees
- btrfs subvolumes
2014-12-19 19:19:29 +01:00
Lennart Poettering
f2cbe59e11
machinectl: add new commands for copying files from/to containers
2014-12-18 01:36:28 +01:00
Lennart Poettering
785890acf6
machinectl: implement "bind" command to create additional bind mounts from host to container during runtime
2014-12-18 01:36:28 +01:00
Michal Schmidt
4a62c710b6
treewide: another round of simplifications
...
Using the same scripts as in f647962d64
"treewide: yet more log_*_errno
+ return simplifications".
2014-11-28 19:57:32 +01:00
Michal Schmidt
56f64d9576
treewide: use log_*_errno whenever %m is in the format string
...
If the format string contains %m, clearly errno must have a meaningful
value, so we might as well use log_*_errno to have ERRNO= logged.
Using:
find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/'
Plus some whitespace, linewrap, and indent adjustments.
2014-11-28 19:49:27 +01:00
Michal Schmidt
f647962d64
treewide: yet more log_*_errno + return simplifications
...
Using:
find . -name '*.[ch]' | while read f; do perl -i.mmm -e \
'local $/;
local $_=<>;
s/(if\s*\([^\n]+\))\s*{\n(\s*)(log_[a-z_]*_errno\(\s*([->a-zA-Z_]+)\s*,[^;]+);\s*return\s+\g4;\s+}/\1\n\2return \3;/msg;
print;'
$f
done
And a couple of manual whitespace fixups.
2014-11-28 18:56:16 +01:00
Michal Schmidt
da927ba997
treewide: no need to negate errno for log_*_errno()
...
It corrrectly handles both positive and negative errno values.
2014-11-28 13:29:21 +01:00
Michal Schmidt
0a1beeb642
treewide: auto-convert the simple cases to log_*_errno()
...
As a followup to 086891e5c1
"log: add an "error" parameter to all
low-level logging calls and intrdouce log_error_errno() as log calls
that take error numbers", use sed to convert the simple cases to use
the new macros:
find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/'
Multi-line log_*() invocations are not covered.
And we also should add log_unit_*_errno().
2014-11-28 12:04:41 +01:00
Lennart Poettering
023fb90b83
ptyforward: rework PTY forwarder logic used by nspawn to utilize the normal event loop
...
We really should not run manual event loops anymore, but standardize on
sd_event, so that we can run sd_bus connections from it eventually.
2014-10-31 16:55:04 +01:00