niusmallnan
22cac7abed
Adjust the parameter upgrade-console order ( #2246 )
2018-02-05 16:22:16 +08:00
niusmallnan
1c2e55ed17
Fixes the following scenario can not reboot ( #2236 )
...
1. use ros install
2. use ros os upgrade
2018-01-25 16:25:09 +08:00
Julien Kassar
82aaa413f5
Fix format 'verbs' ( #2115 )
2018-01-25 09:47:17 +08:00
Julien Kassar
a08ad16a01
Replace Sirupsen/logrus package with rancher/os/log ( #2114 )
2018-01-24 17:57:02 +08:00
niusmallnan
6bd6f0c43c
Fix shutdown -h command ( #2234 )
2018-01-24 17:53:52 +08:00
niusmallnan
b512a9336a
Fix go fmt
2018-01-23 18:09:59 +08:00
niusmallnan
992142b8ea
Merge branch 'master' into shutdown-reboot-arg-fix
2018-01-23 18:01:29 +08:00
niusmallnan
7250ee8ab4
Add more logs for networking conf
2018-01-19 22:42:01 +08:00
niusmallnan
e58456ead9
Add more friendly error message for ros install ( #2225 )
2018-01-17 17:06:07 +08:00
niusmallnan
480e45cd01
Report image version when using ros version subcommand ( #2213 )
2018-01-08 17:58:43 +08:00
niusmallnan
493e12b9a3
Support for updating PATH variables ( #2203 )
2018-01-03 15:30:36 +08:00
niusmallnan
3b92e04065
Support URL when using ros install -c ( #2202 )
2018-01-02 17:17:43 +08:00
niusmallnan
f458e0408d
Add more logs for preload-images action and elegant close some files ( #2196 )
2017-12-29 13:24:51 +08:00
niusmallnan
55368a3897
Auto resize root disk on AWS ( #2191 )
2017-12-26 17:59:08 +08:00
niusmallnan
60909e435f
Add aliyun datasource ( #2169 )
2017-12-19 14:33:44 +08:00
niusmallnan
2dda87e2c4
Fix the container name
...
https://github.com/rancher/os/issues/2176
2017-12-15 17:28:28 +08:00
niusmallnan
7b474cd905
Fix golint check error
...
https://github.com/rancher/os/issues/2166
2017-12-06 13:45:49 +08:00
Chris Marchesi
2f8eaa3314
cmd/power: Set correct container name and ensure full command executed
...
This fixes a few issues that are preventing shutdown and friends from
behaving correctly:
* The command name, which is being used to determine via what command it
was being called (ie: shutdown, reboot, or halt) was not being parsed
for absolute paths. This was preventing certain logic from being handled
(example: enforcing a static time value of "now" for shutdown), but more
problematically was the fact that it was being used as the container
name being passed to runDocker, the function that launches the
independent shutdown container. This was causing the shutdown container
to fail as something like "/sbin/shutdown" is not a valid name for a
container. The logic to parse out the base command being run is actually
present in runDocker, but does not run if a name is supplied to the
function.
* Further, the command line was not being parsed in the shutdown
container if the name supplied to runDocker was non-empty. Rather, the
full command to run just became the name of the container. Hence,
something like "/sbin/shutdown -h now" became just "shutdown", executing
the default power off behaviour for all actions (including reboots).
* Further to this, open-vm-tools expects "/sbin/shutdown -h now" to be a
valid command to halt the system, which was not being recognized as the
only recognized short-form halt flag in shutdown was its capital version
(-H).
This fixes these three issues by parsing out the base of the called
command before sending it to reboot, using all of os.Argv as the command
line to run regardless of if a name was set for the container or not,
and finally adding the lowercase -h switch to the "shutdown" form of
this command ("halt" is still uppercase only).
Fixes rancher/os#2121 .
Fixes rancher/os#2074 .
2017-10-20 17:09:13 -07:00
Sven Dowideit
4769f143cf
set the http_proxy env vars for the consoles
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-09-15 23:38:15 +10:00
Sven Dowideit
baee5d18ea
Refactor a little so 'ros os list' also uses the configured proxy info
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-09-15 13:47:21 +10:00
Sven Dowideit
a608098c39
Revert "Only add SSH configuration lines that are not set"
2017-09-13 22:07:52 +10:00
Sven Dowideit
b92a7752f4
Make the bootstrap phase logable
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-09-13 16:13:15 +10:00
Sven Dowideit
449633abaa
Merge pull request #2088 from SvenDowideit/ros-service-logs-f
...
allow shortened version: ros s logs -f network
2017-09-12 15:05:12 +10:00
Sven Dowideit
fa14b6960b
Merge pull request #2086 from SvenDowideit/add-autoformat-logging
...
Log autoformat script output to /var/log/boot/autoformat.log
2017-09-12 15:04:41 +10:00
Sven Dowideit
21714bb8d3
allow shortened version: ros s logs -f network
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-09-12 15:04:03 +10:00
Sven Dowideit
5e57bc0c99
dhcpcd overwrites resolv.conf when releasing a lease
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-09-12 15:00:20 +10:00
Sven Dowideit
7feee617a7
Log autoformat script output to /var/log/boot/autoformat.log
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-09-12 13:54:28 +10:00
Vincent Fiduccia
6a87cc6556
Only add ssh options that aren't set
2017-09-01 01:10:57 -07:00
Sven Dowideit
5dfc818303
Stop overwriting a good resolv.conf file with the default one
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-08-29 10:10:47 +10:00
Sven Dowideit
f793518aa6
Get RancherOS logging to throw debug logs to a remote syslog server when the kernel netconsole is configured
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-08-17 08:42:37 +10:00
Sven Dowideit
c8915d646d
add a timeout in case a system-container refuses to quit
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-07-31 03:20:09 +00:00
Sven Dowideit
67d932d9f8
Initial fix to stop other containers before the console
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-07-31 03:12:05 +00:00
Sven Dowideit
24f45e4eba
fix finding dockerd so 17.06 works
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-07-19 11:44:33 +10:00
Sven Dowideit
d36d4555aa
Add a little logging to make debugging datasources a little easier
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-07-18 21:52:28 +10:00
Sven Dowideit
cbfe50c5ee
Copy init and cloud-init-save logs from before switchroot
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-07-18 14:13:11 +10:00
Sven Dowideit
ce9ae25741
fix default console detection
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-07-17 14:07:35 +10:00
Sven Dowideit
7cb46e1919
report some more useful cfg validation info when using ros config merge
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-07-17 13:03:50 +10:00
Sven Dowideit
cbcdb2628c
Tell the user if the interpreted cloud confg is invalid and then exit
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-07-17 12:17:41 +10:00
Sven Dowideit
7fb9afe39c
Rename sshd disable cfg to rancher.ssh.disable
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-07-17 11:15:54 +10:00
Sven Dowideit
765a7c3ed4
Add a Recovery console prompt
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-07-16 11:50:01 +10:00
Sven Dowideit
a04c0f3740
Fix ros engine list too
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-07-14 21:15:47 +10:00
Sven Dowideit
6fcc1e3967
fix current console detection
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-07-14 21:15:47 +10:00
Sven Dowideit
d9d3c2b0d8
make centos/fedora consoles work by just starting bash
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
WIP - dont merge
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-07-14 21:15:43 +10:00
Sven Dowideit
d859052453
get the kernel version for the banner
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-07-14 21:15:43 +10:00
Sven Dowideit
553fed3eea
Add the recovery console to the boot menu
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-07-14 21:15:42 +10:00
Sven Dowideit
c94a683b87
autoformat
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-07-14 21:15:42 +10:00
Sven Dowideit
45e422d01e
Add an autologin that allows us to fix the stty
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-07-14 21:15:42 +10:00
Josh Curl
fecbb9df2e
Recovery console
2017-07-14 21:15:42 +10:00
Sven Dowideit
0ccc5ad735
Redo logging so its a little more capable
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-07-13 12:44:47 +10:00
Sven Dowideit
3b4d73e106
Risky: remove 50s for loop delay on network failure (I think its remplaced by the dhcpcd --wait)
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-07-11 18:03:38 +10:00
Sven Dowideit
33a60488cd
test if the hyper-visor servce is available
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-07-11 11:57:02 +10:00
Sven Dowideit
c67eba4dbb
Work out network pre_cmds/pre_up calls
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-07-10 12:08:02 +10:00
Sven Dowideit
b733bde9cd
add some better menu touches, make upgrade also upgrade to the menu, and add a ros config syslinux cmd for editing the global.cfg
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-07-10 11:29:04 +10:00
Sven Dowideit
85436f675b
Merge pull request #1883 from SvenDowideit/detect-vm-and-load-vm-service
...
Detect hypervisor and start its driver service plus vmware cloud-init datasource
2017-07-07 10:50:32 +10:00
Sven Dowideit
340bb42160
add kexec previous
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-07-06 15:50:14 +10:00
Sven Dowideit
c5d4cb91c3
reboot --kexec almost works
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-07-06 10:40:15 +10:00
Sven Dowideit
0fb89736e4
Merge pull request #1799 from gizmotronic/create-mount-points
...
Create mount points for non-swap mounts; fixes #1506
2017-06-29 22:34:58 +10:00
Sven Dowideit
8a741c5d32
Add explicit wait to dhcp
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-06-29 22:11:03 +10:00
gizmotronic
b1d9732f65
Create mount points for non-swap mounts; fixes #1506
2017-06-28 23:44:07 -05:00
Sven Dowideit
437034cb48
Merge pull request #1447 from tetatetit/serial-console-online.net-fixed
...
Fixed serial console login did not work on Online.net and it daughter …
2017-06-20 10:34:26 +10:00
Sven Dowideit
51aff79c7e
Add proper vmware cloud-init datasource from guestinfo
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-06-17 22:56:25 +10:00
Sven Dowideit
e37b7c5331
Make it work consistently for kvm too
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-06-15 23:37:44 +10:00
Sven Dowideit
0f0c9b6149
Merge pull request #1891 from SvenDowideit/cleanup-debug-log-symlink-msg
...
remove symlink error messages on second run of entrypoint
2017-06-06 11:46:15 +10:00
Sven Dowideit
ef7c16d4d4
Merge pull request #1846 from SvenDowideit/simplify-cloud-init
...
Add a default for configdrive, and add '*' to scan all defaultable da…
2017-06-05 15:48:05 +10:00
Sven Dowideit
242d42fbb1
remove symlink error messages on second run of entrypoint
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-06-02 14:17:29 +10:00
Sven Dowideit
62c9096164
Test resize, and update docs
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-06-02 13:21:47 +10:00
Sven Dowideit
b217ad5732
Bounce the syslog service so it notices the hostname change
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-05-19 02:50:56 +00:00
Sven Dowideit
bed064419b
fix ros-install version check for dev builds
...
Signed-off-by: Sven Dowideit <sven@y260.home.org.au>
2017-05-17 16:02:39 +10:00
Sven Dowideit
f7605990a5
Add a default for configdrive, and add '*' to scan all defaultable datasources
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-05-12 01:48:19 +00:00
Sven Dowideit
4602ccc2cb
Need to show the user we're doing something when formating large disks
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-05-11 23:44:45 +00:00
Sven Dowideit
cf89c124a4
Merge pull request #1838 from SvenDowideit/remove-user-docker-link
...
Remove the user-docker link, its redundant
2017-05-09 17:52:36 +10:00
Sven Dowideit
e7ff8e65e9
Remove the user-docker link, its redundant
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-05-08 22:20:14 +10:00
Atila Romero
070ba1a023
changing start-now() to now()-start
...
start - now() is always negative, so only 10 respawns were ever made, regardless of how much time have passed.
2017-05-04 11:41:08 -03:00
Sven Dowideit
32714dbde2
Merge pull request #1815 from rancher/add-docker-init
...
add docker-init to console init for 17.03
2017-04-24 17:14:02 -07:00
Sven Dowideit
5941a6ac4b
add docker-init to console init
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-04-24 23:21:03 +00:00
Sven Dowideit
a21c414ce1
Add debug to upgrade to track down why the global.cfg isn't persisting
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-04-24 19:05:10 +00:00
Sven Dowideit
6ae1a92da7
Don't log the cloud-init metadata to the dmesg log - it will contain some secrets
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-04-21 03:08:49 +00:00
Sven Dowideit
e05f30c4fc
Simplify the network setup
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-04-20 14:58:11 +00:00
Sven Dowideit
2e9b86757b
go fmt
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-04-13 12:36:49 +00:00
Sven Dowideit
73617b8a5a
pass on the statedir and partition parameters to the inner installer images
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-04-13 12:36:49 +00:00
Sven Dowideit
79719e74c8
statedir and noformat together to keep base OS
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-04-13 12:36:49 +00:00
Sven Dowideit
fde6789d4a
use --kexec for os upgrade, not -k
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-04-07 09:32:57 +00:00
Sven Dowideit
79a7e59adb
defer udevsettle to cloud-init-save container
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-04-06 11:49:35 +00:00
Sven Dowideit
ac5cb304d6
Call dhcp release on interfaces that are dhcp:false
...
and then remove any non-specified IP addresses from them too
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-04-03 09:25:55 +00:00
Sven Dowideit
fdc16672d5
ros os upgrade --kexec ... works again
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-04-03 09:18:17 +00:00
Sven Dowideit
1356e609b3
Merge pull request #1743 from rancher/v0.8.x
...
fix downgrade from 0.8/0.9 to 0.7, and back again
2017-04-01 21:52:32 +10:00
Sven Dowideit
62d8aaa58e
Need to remove the immutable bit from ldlinux.sys so root can remove it
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-03-31 12:15:15 +00:00
Sven Dowideit
e871741ec3
need to use the old -t rancher-upgrade type so we can downgrade to older releases
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-03-31 10:41:25 +10:00
Sven Dowideit
d4ae014f76
add scripts/run --openstack, and use the iso if --cloud-config file.iso
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-03-28 16:04:49 +10:00
Sven Dowideit
2f28a00e02
Don't need host dev mount for pre-created partition
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-03-27 00:59:11 +00:00
Sven Dowideit
53c88bc505
Merge pull request #1724 from rancher/docker-container-install-to-partition
...
Fixed install --partition and added scripts/run-install to use it in …
2017-03-26 22:22:19 +10:00
Sven Dowideit
59a752c306
Use the partial cfg for the initial network
...
and release the network device from dhcp if we're not using it
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-03-26 11:49:14 +00:00
Sven Dowideit
15699a253c
Fixed install --partition and added scripts/run-install
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-03-24 12:39:40 +00:00
Sven Dowideit
ab3c508a39
fix for alpine's simpler blkid cmd
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-03-23 01:31:35 +00:00
Sven Dowideit
1e5baa57da
Try RANCHER_BOOT first, and if that's not preset, use rancher.state.dev and then RANCHER_STATE
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-03-14 06:28:05 +00:00
Sven Dowideit
af6888020d
Use a fake cloud-config struct that only contains the NetworkConfig - as arrays dont merge (yet)
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-03-14 16:19:11 +10:00
Sven Dowideit
2d92956c82
Revert "WIP New ros cli"
2017-03-14 12:11:24 +10:00
Sven Dowideit
355859e707
golint&gofmt
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-03-13 12:56:54 +00:00
Sven Dowideit
2cd6ec4db6
move the new cli to 'os' - its very experimental atm
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-03-13 12:56:54 +00:00
Sven Dowideit
dc540a0cf0
get started on the new cli
...
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2017-03-13 12:56:54 +00:00