On 11/07/2012 04:50 PM, Tomas Lestach wrote:
> On Tuesday 06 of November 2012 12:30:09 Johannes Renner wrote:
>> Hello,
>>
>> this is a proposed extension to commit 1ea830a in master:
>>
>> Validation of a kickstart profile is currently done by downloading it from
>> the locally running cobbler. In case of validation problems there is a
>> DownloadException thrown that we can catch and work with.
>>
>> Therefore in case of an error, it makes IMO not very much sense to point to
>> the 'Kickstart File' tab, where the downloaded file contents should
>> actually be shown to the user. The cobbler returns a status 500 in this
>> case, so what we see on this page is the source code of the apache error
>> page. Further, the download link is of course not working.
> 
> Right. I see your point.
> 
>>
>> The attached patch contains the following proposed changes to the code:
>>
>> 1. Change the error message text to point to the file contents on the
>> 'Details' tab 2. Hide the content on the 'Kickstart File' tab in case the
>> download failed
> 
> The problem with your patch is that you don't propagate any helpful (error) 
> message to the user. So if he uploads a kickstart file, that is considered 
> wrong for some reason, I - as an user - would like to know what was the 
> problem with the kickstart file.
> 
> I know that the 500 page we display now isn't helpfull as well.
> 
> I'll try check the code and see if I find something out.

Yes, my cobbler log contains some helpful info, but how to bring this excerpt to
the UI if we are only reacting to a download that failed? I didn't dig deep into
it, I just wanted to hide the html source of the 500 error page. But I agree it
would be much better to present such details to the user.

Excerpt from cobbler.log:

...
Here is the corresponding Cheetah code.
** I had to guess the line & column numbers, so they are probably incorrect:

Line 47, column 8

Line|Cheetah Code
----|-------------------------------------------------------------
44  |
45  |mkdir -p /tmp/rhn
46  |
47  |drives=$(list-harddrives | awk '{print $1}')
            ^
48  |for disk in $drives; do
49  |    DISKS="$DISKS $(fdisk -l /dev/$disk | grep -v "swap\|LVM\|Extended" | 
awk '/^\/dev/{print
$1}')"
50  |done
...

BTW: This error occurred with a kickstart file that was generated using the 
wizard
and pasted into the new profile form afterwards. The cheetah seems to complain 
about
the $ signs in the bash code and wants me to escape them. Actually I would 
expect
this to work, or not? Not so sure how the cheetah will distinguish between bash 
$
signs and kickstart variables?

Thanks,
Johannes

-- 
SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg)
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to