Bug 554556

Summary: Print assigned IP address to the console
Product: [openSUSE] openSUSE 11.2 Reporter: Klaus Kämpf <kkaempf>
Component: WebYaSTAssignee: Ladislav Slezák <lslezak>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P2 - High CC: lslezak
Version: RC 1   
Target Milestone: Final   
Hardware: Other   
OS: Other   
Whiteboard: maint:released:sle11:29137
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: Console screenshot of WebYaST virtual image booting
screenshot
requested /etc/issue
yastwc-ip-a.png: console screenshot ow yastwc printing the url
Screenshot
Patch for displaying the URL
Improved version
... and the updated patch

Description Klaus Kämpf 2009-11-11 14:24:47 UTC
When booting a webyast appliance (in VirtualBox), I am presented with <see attachment>.

Whats missing, is an information about the assigned IP address and thus the URL I have to type into a browser to connect to the appliance.

Request:
Add something (a /etc/init.d script run at the end of the boot process ?) to print the assigned IP adress or - maybe even better - a complete URL to type into a browser (i.e. replace the "Welcome SUSE Linux Enterprise ..." with "Welcome to WebYaST, navigate to https://....:54984 with your browser to connect")


Jiri, maybe someone from your team wants to tackle this.
Comment 1 Klaus Kämpf 2009-11-11 14:25:39 UTC
Hmm, how about starting 'yastwc' late and have it print the assigned IP address to the console ?
Comment 2 Klaus Kämpf 2009-11-11 14:27:36 UTC
Created attachment 326861 [details]
Console screenshot of WebYaST virtual image booting
Comment 3 Josef Reidinger 2009-11-19 15:59:07 UTC
Created attachment 328467 [details]
screenshot

Hi, I look at that issue and I can do this one (see attachment).
I cannot print ip adress as issue doesn't support it (system often have more then one). Is it sufficient solution of show we create better one? (e.g. write to etc/issue hard ip adress in some hack in network start script, but it is quite offensive change).

you can try it if you put this text to /etc/issue:
Based on SUSE Linux Enterprise Server 11 (i586) - Kernel \r (\l).

Welcome to Webyast - to run point your browser to https://\n:54984/
Comment 4 Josef Reidinger 2009-11-19 15:59:44 UTC
please look at my suggestion in previous comment
Comment 5 Klaus Kämpf 2009-11-19 18:22:23 UTC
(In reply to comment #3)
> I cannot print ip adress as issue doesn't support it (system often have more
> then one).

We're talking about appliances here, so only one network interface.
For now, use "eth0". (Should be the vendor configured one later)
Comment 6 Klaus Kämpf 2009-11-19 18:23:25 UTC
(In reply to comment #3)
> Created an attachment (id=328467) [details]
> screenshot
> 
> Hi, I look at that issue and I can do this one (see attachment).

Thats perfect !
Comment 7 Josef Reidinger 2009-11-20 08:54:29 UTC
(In reply to comment #5)
> (In reply to comment #3)
> > I cannot print ip adress as issue doesn't support it (system often have more
> > then one).
> 
> We're talking about appliances here, so only one network interface.
> For now, use "eth0". (Should be the vendor configured one later)

It is not limitation of my code but login which print message from issue.

So to have ip we need patch system quite lot (we should modify during boot /etc/issue or similar thing). So for now we should use hostname (is correct dhcp assigned host). I reassign it to martin to add patch for /etc/issue file.
Comment 8 Josef Reidinger 2009-11-20 08:55:31 UTC
Created attachment 328609 [details]
requested /etc/issue

Martin - could you patch file /etc/issue to attached one?
Comment 9 Martin Vidner 2009-11-20 09:27:30 UTC
That does not help. In my VM (VBox NAT), \n says "linux".
Comment 10 Klaus Kämpf 2009-11-20 10:52:46 UTC
This needs fixing, esp. because of #552548


Can't we just use something like
ifconfig eth0 | grep "inet addr" | cut -d ":" -f 2 | cut -d " " -f 1
Comment 11 Martin Vidner 2009-11-24 14:21:14 UTC
Created attachment 329217 [details]
yastwc-ip-a.png: console screenshot ow yastwc printing the url

Screenshot using the snippet from comment 10
Comment 12 Klaus Kämpf 2009-11-24 14:49:10 UTC
I like it.
But is this visible enough for the casual user ?
Comment 13 Ladislav Slezák 2009-11-25 07:38:05 UTC
Created attachment 329365 [details]
Screenshot

What do you think about this proposal?
Comment 14 Ladislav Slezák 2009-11-25 07:41:15 UTC
Created attachment 329366 [details]
Patch for displaying the URL 

Patch for the previous screenshot
Comment 15 Klaus Kämpf 2009-11-25 09:05:20 UTC
See bnc#558281 for the next step on the problem of discovery
Comment 16 Klaus Kämpf 2009-11-25 09:06:33 UTC
(In reply to comment #13)
> Created an attachment (id=329365) [details]
> Screenshot
> 
> What do you think about this proposal?

Yeah, thats better.

We might even add a newline and a tab in front to make it visible on non-color terminals ?!
Comment 17 Ladislav Slezák 2009-11-25 09:17:51 UTC
Created attachment 329383 [details]
Improved version

Added tab at the beginning, check also the non-color version.
Comment 18 Ladislav Slezák 2009-11-25 09:20:01 UTC
Created attachment 329385 [details]
... and the updated patch
Comment 19 Klaus Kämpf 2009-11-25 09:56:06 UTC
(In reply to comment #17)
> Created an attachment (id=329383) [details]
> Improved version
> 
> Added tab at the beginning, check also the non-color version.

Perfect, thanks !
Comment 20 Ladislav Slezák 2009-11-25 10:01:32 UTC
OK, I'll push it to the GIT repo and make a package.
Comment 21 Ladislav Slezák 2009-11-25 10:57:42 UTC
Fixed in yast2-webclient-0.0.22.
Comment 22 Swamp Workflow Management 2009-12-02 20:53:31 UTC
Update released for: yast2-webclient
Products:
SLE-WEBYAST 1.0 (i386, x86_64)