Re: [cobbler-devel] Bug introduced by eb3c8d35c481 (Get rid of deprecated "bonding" field")

2014-09-02 Thread Nishanth Aravamudan
On 31.08.2014 [10:08:08 +0200], J?rgen Maas wrote:
> Hi Nishanth,
> 
> This should be fixed now in master, someone else sent a pull request which
> i just merged.
> 
> I thank you for your valuable feedback, but is it possible for you to send
> patches through github?

Yep, I can do that in the future -- I was trying to recover and rebase
my local installation (expect a pile of patches from me shortly), and
ran into a bunch of issues, so I just wanted to get them out the door.

> That would be way more convenient for me to merge and keep track of changes
> by other people.

Totally understood.

> Anyway, please keep on going finding bugs in the master branch :)

Gladly :)

-Nish

___
cobbler-devel mailing list
cobbler-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/cobbler-devel


Re: [cobbler-devel] Bug introduced by eb3c8d35c481 (Get rid of deprecated "bonding" field")

2014-08-31 Thread Jörgen Maas
Hi Nishanth,

This should be fixed now in master, someone else sent a pull request which
i just merged.

I thank you for your valuable feedback, but is it possible for you to send
patches through github?
That would be way more convenient for me to merge and keep track of changes
by other people.

Anyway, please keep on going finding bugs in the master branch :)

Thanks!


On Thu, Aug 28, 2014 at 11:42 PM, Nishanth Aravamudan <
n...@linux.vnet.ibm.com> wrote:

> With this commit applied, I get the following error when trying to
> render snippets/post_install_network_config_deb as invoked by
> sample.preseed:
>
> Thu Aug 28 16:34:19 2014 - INFO | generate_script
> Thu Aug 28 16:34:19 2014 - ERROR |
> # *** ERROR ***
> #
> # There is a templating error preventing this file from rendering
> correctly.
> #
> # This is most likely not due to a bug in Cobbler and is something you can
> fix.
> #
> # Look at the message below to see what things are causing problems.
> #
> # (1) Does the template file reference a $variable that is not defined?
> # (2) is there a formatting error in a Cheetah directive?
> # (3) Should dollar signs ($) be escaped that are not being escaped?
> #
> # Try fixing the problem and then investigate to see if this message goes
> # away or changes.
> #
> #
> # need more than 1 value to unpack
> #   File "/usr/lib/python2.7/site-packages/cobbler/templar.py", line 204,
> in render_cheetah
> # data_out = t.respond()
> #
> #   File
> "cheetah_DynamicallyCompiledCheetahTemplate_1409261659_45_92467.py", line
> 127, in respond
> #
> #   File
> "cheetah_DynamicallyCompiledCheetahTemplate_1409261659_45_92467.py", line
> 70, in __errorCatcher1
> #
> #   File "", line 1, in 
> #
> #   File "/usr/lib/python2.7/site-packages/cobbler/template_api.py", line
> 173, in SNIPPET
> # result = BuiltinTemplate.SNIPPET(self, file)
> #
> #   File "DynamicallyCompiledCheetahTemplate.py", line 88, in SNIPPET
> #
> #   File "/usr/lib64/python2.7/site-packages/Cheetah/Template.py", line
> 1615, in _handleCheetahInclude
> # self._CHEETAH__cheetahIncludes[_includeID].respond(trans)
> #
> #   File
> "cheetah_DynamicallyCompiledCheetahTemplate_1409261659_65_55359.py", line
> 438, in respond
> #
>
> Thu Aug 28 16:34:19 2014 - INFO | Exception occured:  cobbler.cexceptions.CX'>
> Thu Aug 28 16:34:19 2014 - INFO | Exception value: 'Error templating file,
> check cobbler.log for more details'
> Thu Aug 28 16:34:19 2014 - INFO | Exception Info:
>   File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 2154, in
> _dispatch
> return method_handle(*params)
>File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 1121,
> in generate_script
> return self.api.generate_script(profile, system, name)
>File "/usr/lib/python2.7/site-packages/cobbler/api.py", line 701, in
> generate_script
> return self.pxegen.generate_script("system", system, name)
>File "/usr/lib/python2.7/site-packages/cobbler/pxegen.py", line 1102,
> in generate_script
> return self.templar.render(template_data, blended, None, obj)
>File "/usr/lib/python2.7/site-packages/cobbler/templar.py", line 112,
> in render
> data_out = self.render_cheetah(raw_data, search_table, subject)
>File "/usr/lib/python2.7/site-packages/cobbler/templar.py", line 211,
> in render_cheetah
> raise CX("Error templating file, check cobbler.log for more details")
>
> The following changes let the templating succeed:
>
> diff --git a/snippets/post_install_network_config
> b/snippets/post_install_network_config
> index 2b0e57c..8dcced7 100644
> --- a/snippets/post_install_network_config
> +++ b/snippets/post_install_network_config
> @@ -173,7 +173,7 @@ cat >> $devfile << EOF
>  BONDING_OPTS="$bonding_opts"
>  EOF
>  #end if
> -#elif $iface_type in ("bond_slave") and $iface_master != ""
> +#elif $iface_type == "bond_slave" and $iface_master != ""
>  echo "SLAVE=yes" >> $devfile
>  echo "MASTER=$iface_master" >> $devfile
>  echo "HOTPLUG=no" >> $devfile
> diff --git a/snippets/post_install_network_config_deb
> b/snippets/post_install_network_config_deb
> index c135ecb..697a3dd 100644
> --- a/snippets/post_install_network_config_deb
> +++ b/snippets/post_install_network_config_deb
> @@ -97,7 +97,7 @@ echo "auto $iname" >> /etc/network/interfaces
>  ##
> ===
>  #if $iface_type in ("bond","bonded_bridge_slave")
>#pass
> -#elif $iface_type in ("bond_slave") and $iface_master != ""
> +#elif $iface_type == "bond_slave" and $iface_master != ""
>#pass
>  #elif $iface_type == "bridge"
>#set $slave_ports = " ".join($bridge_slaves.get($iname,[]))
> @@ -124,7 +124,7 @@ echo "   netmask $netmask" >> /etc/network/interfaces
>  echo "   mtu $mtu" >> /etc/network/interfaces
> #end if
> #end if
> -#if $ip == "" and $iface_type in ("bond") a