sunbeam command is either too verbose or too quiet

Bug #2052407 reported by Andre Ruiz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Snap
New
Undecided
Unassigned

Bug Description

When executing sunbeam commands (i.e. bootstrap, configure, resize, etc.) the status on the screen is too frequent. It seems nice to have a spinning icon at the beginning of the line, but the drawback is that if you run it through a script and want to capture the output messages, you end up with hundreds of thousands of lines depending of the time it takes.

On the other hand, if you disable terminal pty emulation (i.e. in an SSH, without specifying -t) it will instead be completely quiet, without telling anything at all during the whole time. Which is equally undesirable.

In other works, too much or too little. An option in the middle would be nice, both to the user and to scripts that collect the output. For example, it would be nice if every new status on a new line, leaving others behind instead of overwriting them on the same line and each line written only once without the spinning icon.

Another issue is that the option -q (quiet) does not seem to do anything. The amount of messages that I could see with or without it seemed to be the same. Maybe it could the used to achieve that.

Andre Ruiz (andre-ruiz)
description: updated
Revision history for this message
Andre Ruiz (andre-ruiz) wrote :
Download full text (3.7 KiB)

I implemented some python code to realtime filter the output and remove color codes, spinning icon and repeated lines, and the result was the following. This is a suggestion of a simpler output.

+ sunbeam cluster bootstrap -m /home/ubuntu/manifest.yaml --role compute --role control
00:13:17.364 > Checking for host configuration of minimum 4 core and 16G RAM ...
00:13:17.364 > Checking for presence of Juju ...
00:13:17.364 > Checking for presence of ssh-keys interface ...
00:13:17.364 > Checking if user ubuntu is member of group snap_daemon ...
00:13:17.364 > Checking for ~/.local/share directory for Juju ...
00:13:17.364 > Checking if Hypervisor Hostname is same as FQDN ...
00:13:17.364 > Authenticating with Juju controller ...
00:13:17.364 > Bootstrapping Sunbeam cluster ...
00:13:17.364 > Writing Manifest to database ...
00:13:17.364 > Bootstrapping Juju onto machine ...
00:13:17.615 > Creating user for machine in Juju ...
00:13:17.615 > Adding Juju controller to cluster database ...
00:13:17.615 > Adding Juju user to cluster database ...
00:13:17.615 > Saving bootstrap user credentials ...
00:13:17.615 > Saving machine user sunbeam11.mydomain for local usage ...
00:13:17.615 > Registering machine user sunbeam11.mydomain using token ...
00:13:17.865 > Initializing Terraform from provider mirror ...
00:13:18.116 > Deploying Sunbeam Machine ...
00:13:19.978 > Adding Sunbeam Machine unit to machine sunbeam11.mydomain ...
00:13:29.854 > Initializing Terraform from provider mirror ...
00:13:29.854 > Deploying MicroK8S ...
00:13:32.337 > Adding MicroK8S unit to machine ...
00:15:08.583 > Storing MicroK8S configuration in sunbeam database ...
00:15:08.583 > Adding MicroK8S cloud to Juju controller ...
00:15:08.583 > Initializing Terraform from provider mirror ...
00:15:08.583 > Deploying MicroCeph ...
00:15:09.134 > Initializing Terraform from provider mirror ...
00:15:09.384 > Deploying OpenStack Control Plane to Kubernetes (this may take a while) ... deploying services
00:15:47.939 > Deploying OpenStack Control Plane to Kubernetes (this may take a while) ... waiting for services to come online (0/30)
00:17:09.184 > Deploying OpenStack Control Plane to Kubernetes (this may take a while) ... waiting for services to come online (1/30)
00:19:15.430 > Deploying OpenStack Control Plane to Kubernetes (this may take a while) ... waiting for services to come online (2/30)
00:19:30.192 > Deploying OpenStack Control Plane to Kubernetes (this may take a while) ... waiting for services to come online (3/30)
00:19:51.990 > Deploying OpenStack Control Plane to Kubernetes (this may take a while) ... waiting for services to come online (9/30)
00:20:09.952 > Deploying OpenStack Control Plane to Kubernetes (this may take a while) ... waiting for services to come online (16/30)
00:20:31.751 > Deploying OpenStack Control Plane to Kubernetes (this may take a while) ... waiting for services to come online (21/30)
00:21:10.307 > Deploying OpenStack Control Plane to Kubernetes (this may take a while) ... waiting for services to come online (27/30)
00:21:32.105 > Deploying OpenStack Control Plane to Kubernetes (this may take a whil...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.