Glenn Bailey wrote:
>> Max Krasnyansky wrote:
>>> Folks,
>>>
>>> I'm looking for suggestions on how to debug snippet code. I got a
>>> snippet here that fails for some systems but works for others.
>>> When I say fails I mean that it does not get expanded, I just
>>> git this
>>>     $SNIPPET('my_snippet')
>>> in the final kickstart.
>>>
>>> The interesting thing is that this snippet starts failing after the
>>> system is edited with the web UI. I diffed .json files before and
>> after
>>> and I do not see anything obvious in there (I mean there are
>> differences
>>> but they seem fairly minor). There are no errors in the logs.
>>>
>>> So is there any way to enable verbose mode in cheetah or something to
>>> see why the snippet is not getting expanded ?
> 
> I'll start with the obvious here:
> 
> - Are you not seeing the snippet expanded when you via the Kickstart in the 
> WebUI?
Nope. Once it's busted it's busted everywhere :).

> - What happens when you re-edit the Kickstart or the snippet via the console 
> and save it that way, does the issue still appear ?
Makes no difference. As I mentioned the only thing that affects this is
editing & saving the system entry via WebUI.
In other words
  1. cobbler system copy --name=good-sys --newname=good-sys-clone
  2. snippet is working for good-sys-clone
  3. edit good-sys-clone via WebUI. No changes are made.
     Just click edit then save.
  4. snippet stops working for good-sys-clone

> - Now this is just cover your butt kinda thing, but does the snippet start
> on column 0 in the Kickstart? You have it tabbed in the email, not sure if
> that's an issue but I try every little step when troubleshooting ;-)
Yep. Starts at column 0.

> - What happens when you replace that specific snippet line with a line for
> a known working snippet?
I actually have a bunch of other snippets (package selection, partition
selection, xconfig, etc) in that kickstart. They all expand just fine.
So my guess is that the one that fails includes a reference to a variable that
disappears after editing the system with WebUI.
The questions is how to find out which one. That snippet is fairly complex.
It's based on the network-post-install that comes with the cobbler itself.
So there are plenty of vars in there.

Thanx
Max


> _______________________________________________
> cobbler mailing list
> cobbler@lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/cobbler

_______________________________________________
cobbler mailing list
cobbler@lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/cobbler

Reply via email to