Re: [cobbler] yaml.parser.ParserError after upgrade to 2.4.7

2014-08-21 Thread Jörgen Maas
Also pushed to release24 branch, if you are willing to test this that would
be great.


On Fri, Aug 22, 2014 at 7:24 AM, Jörgen Maas  wrote:

> Of course, another error when backporting stuff.
> This should fix that.
>
> diff --git a/cobbler.spec b/cobbler.spec
> index 367dd05..03249bd 100644
> --- a/cobbler.spec
> +++ b/cobbler.spec
> @@ -17,7 +17,6 @@ Url: http://www.cobblerd.org/
>
>  BuildRequires: redhat-rpm-config
>  BuildRequires: git
> -BuildRequires: PyYAML
>  BuildRequires: python-cheetah
>  BuildRequires: python-setuptools
>
> diff --git a/cobbler/api.py b/cobbler/api.py
> index aa4d2ee..00f0e3c 100644
> --- a/cobbler/api.py
> +++ b/cobbler/api.py
> @@ -23,9 +23,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor,
> Boston, MA
>  """
>
>  import sys
> -import yaml
>  import config
>  import utils
> +from ConfigParser import ConfigParser
> +
>  import action_sync
>  import action_check
>  import action_reposync
> @@ -207,7 +208,7 @@ class BootAPI:
>  if debug:
>  logger = self.logger.debug
>  else:
> -logger = self.logger.info
> +logger = self.logger.info
>  if args is None:
>  logger("%s" % msg)
>  else:
> @@ -220,7 +221,7 @@ class BootAPI:
>  What version is cobbler?
>
>  If extended == False, returns a float for backwards compatibility
> -
> +
>  If extended == True, returns a dict:
>
>  gitstamp  -- the last git commit hash
> @@ -229,13 +230,22 @@ class BootAPI:
>  version   -- something like "1.3.2"
>  version_tuple -- something like [ 1, 3, 2 ]
>  """
> -fd = open("/etc/cobbler/version")
> -ydata = fd.read()
> -fd.close()
> -data = yaml.safe_load(ydata)
>
> +
> +config = ConfigParser()
> +config.read("/etc/cobbler/version")
> +data = {}
> +data["gitdate"] = config.get("cobbler","gitdate")
> +data["gitstamp"] = config.get("cobbler","gitstamp")
> +data["builddate"] = config.get("cobbler","builddate")
> +data["version"] = config.get("cobbler","version")
> +# dont actually read the version_tuple from the version file
> +data["version_tuple"] = []
> +for num in data["version"].split("."):
> +data["version_tuple"].append(int(num))
> +
>  if not extended:
>  # for backwards compatibility and use with koan's comparisons
> -elems = data["version_tuple"]
> +elems = data["version_tuple"]
>  return int(elems[0]) + 0.1*int(elems[1]) + 0.001*int(elems[2])
>  else:
>  return data
>
>
>
> On Fri, Aug 22, 2014 at 12:33 AM, Orion Poplawski 
> wrote:
>
>> But the method of creation changed between 2.4.6 and 2.4.7 with:
>>
>> commit f78979a8463e5519c21ea40dfebc438ff3c07b99
>> Author: Jörgen Maas 
>> Date:   Fri Jul 25 09:47:58 2014 +0200
>>
>> Fix broken gitdate, gitstamp values in version file.
>>
>> diff --git a/setup.py b/setup.py
>> index 970b4f9..dd5bd46 100644
>> --- a/setup.py
>> +++ b/setup.py
>> @@ -1,5 +1,6 @@
>>  #!/usr/bin/env python
>> -import glob, os, sys, time, yaml
>> +import glob, os, sys, time
>> +from ConfigParser import ConfigParser
>>  from distutils.core import setup, Command
>>  from distutils.command.build_py import build_py as _build_py
>>  import unittest
>> @@ -77,24 +78,24 @@ def gen_manpages():
>>  #
>>
>>  def gen_build_version():
>> -fd = open(os.path.join(OUTPUT_DIR, "version"),"w+")
>> -gitdate = "?"
>> -gitstamp = "?"
>>  builddate = time.asctime()
>> -if os.path.exists(".git"):
>> -   # for builds coming from git, include the date of the last commit
>> -   cmd = subprocess.Popen(["/usr/bin/git","log","--format=%h%n%ad",
>> "-1"],stdout=subprocess.
>> -   data = cmd.communicate()[0].strip()
>> -   if cmd.returncode == 0:
>> -   gitstamp, gitdate = data.split("\n")
>> -data = {
>> -   "gitdate" : gitdate,
>> -   "gitstamp"  : gitstamp,
>> -   "builddate" : builddate,
>> -   "version"   : VERSION,
>> -   "version_tuple" : [ int(x) for x in VERSION.split(".")]
>> -}
>> -fd.write(yaml.dump(data))
>> +cmd = subprocess.Popen(["/usr/bin/git", "log", "--format=%h%n%ad",
>> "-1"], stdout=subprocess
>> +data = cmd.communicate()[0].strip()
>> +if cmd.returncode == 0:
>> +gitstamp, gitdate = data.split("\n")
>> +else:
>> +gitdate = "?"
>> +gitstamp = "?"
>> +
>> +fd = open(os.path.join(OUTPUT_DIR, "version"), "w+")
>> +config = ConfigParser()
>> +config.add_section("cobbler")
>> +config.set("cobbler","gitdate", gitdate)
>> +config.set("cobbler","gitstamp", gitstamp)
>> +config.set("cobbler","builddate", builddate)
>> +config.set("cobbler","version", VERSION)
>> +config.set("cobbler","version_tuple", [ int(x

Re: [cobbler] yaml.parser.ParserError after upgrade to 2.4.7

2014-08-21 Thread Jörgen Maas
Of course, another error when backporting stuff.
This should fix that.

diff --git a/cobbler.spec b/cobbler.spec
index 367dd05..03249bd 100644
--- a/cobbler.spec
+++ b/cobbler.spec
@@ -17,7 +17,6 @@ Url: http://www.cobblerd.org/

 BuildRequires: redhat-rpm-config
 BuildRequires: git
-BuildRequires: PyYAML
 BuildRequires: python-cheetah
 BuildRequires: python-setuptools

diff --git a/cobbler/api.py b/cobbler/api.py
index aa4d2ee..00f0e3c 100644
--- a/cobbler/api.py
+++ b/cobbler/api.py
@@ -23,9 +23,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA
 """

 import sys
-import yaml
 import config
 import utils
+from ConfigParser import ConfigParser
+
 import action_sync
 import action_check
 import action_reposync
@@ -207,7 +208,7 @@ class BootAPI:
 if debug:
 logger = self.logger.debug
 else:
-logger = self.logger.info
+logger = self.logger.info
 if args is None:
 logger("%s" % msg)
 else:
@@ -220,7 +221,7 @@ class BootAPI:
 What version is cobbler?

 If extended == False, returns a float for backwards compatibility
-
+
 If extended == True, returns a dict:

 gitstamp  -- the last git commit hash
@@ -229,13 +230,22 @@ class BootAPI:
 version   -- something like "1.3.2"
 version_tuple -- something like [ 1, 3, 2 ]
 """
-fd = open("/etc/cobbler/version")
-ydata = fd.read()
-fd.close()
-data = yaml.safe_load(ydata)
+
+config = ConfigParser()
+config.read("/etc/cobbler/version")
+data = {}
+data["gitdate"] = config.get("cobbler","gitdate")
+data["gitstamp"] = config.get("cobbler","gitstamp")
+data["builddate"] = config.get("cobbler","builddate")
+data["version"] = config.get("cobbler","version")
+# dont actually read the version_tuple from the version file
+data["version_tuple"] = []
+for num in data["version"].split("."):
+data["version_tuple"].append(int(num))
+
 if not extended:
 # for backwards compatibility and use with koan's comparisons
-elems = data["version_tuple"]
+elems = data["version_tuple"]
 return int(elems[0]) + 0.1*int(elems[1]) + 0.001*int(elems[2])
 else:
 return data



On Fri, Aug 22, 2014 at 12:33 AM, Orion Poplawski 
wrote:

> But the method of creation changed between 2.4.6 and 2.4.7 with:
>
> commit f78979a8463e5519c21ea40dfebc438ff3c07b99
> Author: Jörgen Maas 
> Date:   Fri Jul 25 09:47:58 2014 +0200
>
> Fix broken gitdate, gitstamp values in version file.
>
> diff --git a/setup.py b/setup.py
> index 970b4f9..dd5bd46 100644
> --- a/setup.py
> +++ b/setup.py
> @@ -1,5 +1,6 @@
>  #!/usr/bin/env python
> -import glob, os, sys, time, yaml
> +import glob, os, sys, time
> +from ConfigParser import ConfigParser
>  from distutils.core import setup, Command
>  from distutils.command.build_py import build_py as _build_py
>  import unittest
> @@ -77,24 +78,24 @@ def gen_manpages():
>  #
>
>  def gen_build_version():
> -fd = open(os.path.join(OUTPUT_DIR, "version"),"w+")
> -gitdate = "?"
> -gitstamp = "?"
>  builddate = time.asctime()
> -if os.path.exists(".git"):
> -   # for builds coming from git, include the date of the last commit
> -   cmd = subprocess.Popen(["/usr/bin/git","log","--format=%h%n%ad",
> "-1"],stdout=subprocess.
> -   data = cmd.communicate()[0].strip()
> -   if cmd.returncode == 0:
> -   gitstamp, gitdate = data.split("\n")
> -data = {
> -   "gitdate" : gitdate,
> -   "gitstamp"  : gitstamp,
> -   "builddate" : builddate,
> -   "version"   : VERSION,
> -   "version_tuple" : [ int(x) for x in VERSION.split(".")]
> -}
> -fd.write(yaml.dump(data))
> +cmd = subprocess.Popen(["/usr/bin/git", "log", "--format=%h%n%ad",
> "-1"], stdout=subprocess
> +data = cmd.communicate()[0].strip()
> +if cmd.returncode == 0:
> +gitstamp, gitdate = data.split("\n")
> +else:
> +gitdate = "?"
> +gitstamp = "?"
> +
> +fd = open(os.path.join(OUTPUT_DIR, "version"), "w+")
> +config = ConfigParser()
> +config.add_section("cobbler")
> +config.set("cobbler","gitdate", gitdate)
> +config.set("cobbler","gitstamp", gitstamp)
> +config.set("cobbler","builddate", builddate)
> +config.set("cobbler","version", VERSION)
> +config.set("cobbler","version_tuple", [ int(x) for x in
> VERSION.split(".")])
> +config.write(fd)
>  fd.close()
>
>  #
>
>
>
>
> On 08/18/2014 02:41 PM, Jörgen Maas wrote:
>
>> Not very likely, the file is generated by setup.py when
>> building/installing.
>>
>>
>>
>> On Mon, Aug 18, 2014 at 10:11 PM, Greg Chavez > 

Re: [cobbler] yaml.parser.ParserError after upgrade to 2.4.7

2014-08-21 Thread Orion Poplawski

But the method of creation changed between 2.4.6 and 2.4.7 with:

commit f78979a8463e5519c21ea40dfebc438ff3c07b99
Author: Jörgen Maas 
Date:   Fri Jul 25 09:47:58 2014 +0200

Fix broken gitdate, gitstamp values in version file.

diff --git a/setup.py b/setup.py
index 970b4f9..dd5bd46 100644
--- a/setup.py
+++ b/setup.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
-import glob, os, sys, time, yaml
+import glob, os, sys, time
+from ConfigParser import ConfigParser
 from distutils.core import setup, Command
 from distutils.command.build_py import build_py as _build_py
 import unittest
@@ -77,24 +78,24 @@ def gen_manpages():
 #

 def gen_build_version():
-fd = open(os.path.join(OUTPUT_DIR, "version"),"w+")
-gitdate = "?"
-gitstamp = "?"
 builddate = time.asctime()
-if os.path.exists(".git"):
-   # for builds coming from git, include the date of the last commit
-   cmd = 
subprocess.Popen(["/usr/bin/git","log","--format=%h%n%ad","-1"],stdout=subprocess.

-   data = cmd.communicate()[0].strip()
-   if cmd.returncode == 0:
-   gitstamp, gitdate = data.split("\n")
-data = {
-   "gitdate" : gitdate,
-   "gitstamp"  : gitstamp,
-   "builddate" : builddate,
-   "version"   : VERSION,
-   "version_tuple" : [ int(x) for x in VERSION.split(".")]
-}
-fd.write(yaml.dump(data))
+cmd = subprocess.Popen(["/usr/bin/git", "log", "--format=%h%n%ad", "-1"], 
stdout=subprocess

+data = cmd.communicate()[0].strip()
+if cmd.returncode == 0:
+gitstamp, gitdate = data.split("\n")
+else:
+gitdate = "?"
+gitstamp = "?"
+
+fd = open(os.path.join(OUTPUT_DIR, "version"), "w+")
+config = ConfigParser()
+config.add_section("cobbler")
+config.set("cobbler","gitdate", gitdate)
+config.set("cobbler","gitstamp", gitstamp)
+config.set("cobbler","builddate", builddate)
+config.set("cobbler","version", VERSION)
+config.set("cobbler","version_tuple", [ int(x) for x in 
VERSION.split(".")])
+config.write(fd)
 fd.close()

 #



On 08/18/2014 02:41 PM, Jörgen Maas wrote:

Not very likely, the file is generated by setup.py when building/installing.



On Mon, Aug 18, 2014 at 10:11 PM, Greg Chavez mailto:greg.cha...@gmail.com>> wrote:

I pulled down a backup of the version file from a few days ago and solved
the issue:

root@io-ns-03:~> cat /etc/cobbler/version
builddate: Tue Apr 22 15:30:11 2014
gitdate: '?'
gitstamp: '?'
version: 2.4.4
version_tuple: [2, 4, 4]

So like the 2.6 version file snuck into the 2.4.7 package?


On Mon, Aug 18, 2014 at 3:56 PM, Jörgen Maas mailto:jorgen.m...@gmail.com>> wrote:

The format of the version file changed in 2.6.x (it's now basically
ini format using python ConfigParser)


On Mon, Aug 18, 2014 at 5:14 PM, Greg Chavez mailto:greg.cha...@gmail.com>> wrote:

Thanks for your reply, Alan.

I didn't do a find/xargs/grep for version_tuple!  Drat, bad
troubleshooting. But in any case, even converting that file to
YAML doesn't seem to help, I just get more errors.

Another interesting thing, the format of /etc/cobbler/version in
2.6.3 is not in YAML either.

Whatever. This is only affecting the Web console, so I can stay in
business while I stand up 2.6 on a new server and replicate.

--Greg


On Mon, Aug 18, 2014 at 10:49 AM, Alan Evangelista
mailto:ala...@linux.vnet.ibm.com>> 
wrote:

On 08/18/2014 11:27 AM, Greg Chavez wrote:

So I upgraded the cobbler and cobbler-web yum packages
from 2.4.4 to 2.4.7, in preparation for upgrading to 2.6
(this is a RedHat 5.6 system).  Cobbler works fine from
the command line, but I get an error when I attempt to
login to the Web console.  In /var/log/cobbler, I get this
every time I access:


 Fri Aug 15 14:59:08 2014 - INFO | Exception occured:
 yaml.parser.ParserError
 Fri Aug 15 14:59:08 2014 - INFO | Exception value:
expected
 '', but found ''
   in "", line 2, column 1:
 version_tuple = [2, 4, 7]
 ^


/etc/cobbler/version has incorrect format, it should be in
YAML.. Example:

builddate: Thu Jan 30 21:42:10 2014
gitdate: Mon Dec 9 11:08:16 2013 -0800
gitstamp: 2181fa3
version: 2.5.0
version_tuple: [2, 5, 0]

It is possible you'll have conflic

Re: [cobbler] yaml.parser.ParserError after upgrade to 2.4.7

2014-08-18 Thread Jörgen Maas
Not very likely, the file is generated by setup.py when building/installing.



On Mon, Aug 18, 2014 at 10:11 PM, Greg Chavez  wrote:

> I pulled down a backup of the version file from a few days ago and solved
> the issue:
>
> root@io-ns-03:~> cat /etc/cobbler/version
> builddate: Tue Apr 22 15:30:11 2014
> gitdate: '?'
> gitstamp: '?'
> version: 2.4.4
> version_tuple: [2, 4, 4]
>
> So like the 2.6 version file snuck into the 2.4.7 package?
>
>
> On Mon, Aug 18, 2014 at 3:56 PM, Jörgen Maas 
> wrote:
>
>> The format of the version file changed in 2.6.x (it's now basically ini
>> format using python ConfigParser)
>>
>>
>> On Mon, Aug 18, 2014 at 5:14 PM, Greg Chavez 
>> wrote:
>>
>>> Thanks for your reply, Alan.
>>>
>>> I didn't do a find/xargs/grep for version_tuple!  Drat, bad
>>> troubleshooting. But in any case, even converting that file to YAML doesn't
>>> seem to help, I just get more errors.
>>>
>>> Another interesting thing, the format of /etc/cobbler/version in 2.6.3
>>> is not in YAML either.
>>>
>>> Whatever. This is only affecting the Web console, so I can stay in
>>> business while I stand up 2.6 on a new server and replicate.
>>>
>>> --Greg
>>>
>>>
>>> On Mon, Aug 18, 2014 at 10:49 AM, Alan Evangelista <
>>> ala...@linux.vnet.ibm.com> wrote:
>>>
 On 08/18/2014 11:27 AM, Greg Chavez wrote:

> So I upgraded the cobbler and cobbler-web yum packages from 2.4.4 to
> 2.4.7, in preparation for upgrading to 2.6 (this is a RedHat 5.6 system).
> Cobbler works fine from the command line, but I get an error when I 
> attempt
> to login to the Web console.  In /var/log/cobbler, I get this every time I
> access:
>
>
> Fri Aug 15 14:59:08 2014 - INFO | Exception occured:
> yaml.parser.ParserError
> Fri Aug 15 14:59:08 2014 - INFO | Exception value: expected
> '', but found ''
>   in "", line 2, column 1:
> version_tuple = [2, 4, 7]
> ^
>
>
 /etc/cobbler/version has incorrect format, it should be in YAML..
 Example:

 builddate: Thu Jan 30 21:42:10 2014
 gitdate: Mon Dec 9 11:08:16 2013 -0800
 gitstamp: 2181fa3
 version: 2.5.0
 version_tuple: [2, 5, 0]

 It is possible you'll have conflicts with other files. I'd recommend
 backing up important data and making a a clean installation.


 Regards,
 Alan Evangelista

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

>>>
>>>
>>>
>>> --
>>> \*..+.-
>>> --Greg Chavez
>>> +//..;};
>>>
>>> ___
>>> cobbler mailing list
>>> cobbler@lists.fedorahosted.org
>>> https://lists.fedorahosted.org/mailman/listinfo/cobbler
>>>
>>>
>>
>>
>> --
>> Grtz,
>> Jörgen Maas
>>
>> ___
>> cobbler mailing list
>> cobbler@lists.fedorahosted.org
>> https://lists.fedorahosted.org/mailman/listinfo/cobbler
>>
>>
>
>
> --
> \*..+.-
> --Greg Chavez
> +//..;};
>
> ___
> cobbler mailing list
> cobbler@lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/cobbler
>
>


-- 
Grtz,
Jörgen Maas
___
cobbler mailing list
cobbler@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/cobbler


Re: [cobbler] yaml.parser.ParserError after upgrade to 2.4.7

2014-08-18 Thread Greg Chavez
I pulled down a backup of the version file from a few days ago and solved
the issue:

root@io-ns-03:~> cat /etc/cobbler/version
builddate: Tue Apr 22 15:30:11 2014
gitdate: '?'
gitstamp: '?'
version: 2.4.4
version_tuple: [2, 4, 4]

So like the 2.6 version file snuck into the 2.4.7 package?


On Mon, Aug 18, 2014 at 3:56 PM, Jörgen Maas  wrote:

> The format of the version file changed in 2.6.x (it's now basically ini
> format using python ConfigParser)
>
>
> On Mon, Aug 18, 2014 at 5:14 PM, Greg Chavez 
> wrote:
>
>> Thanks for your reply, Alan.
>>
>> I didn't do a find/xargs/grep for version_tuple!  Drat, bad
>> troubleshooting. But in any case, even converting that file to YAML doesn't
>> seem to help, I just get more errors.
>>
>> Another interesting thing, the format of /etc/cobbler/version in 2.6.3 is
>> not in YAML either.
>>
>> Whatever. This is only affecting the Web console, so I can stay in
>> business while I stand up 2.6 on a new server and replicate.
>>
>> --Greg
>>
>>
>> On Mon, Aug 18, 2014 at 10:49 AM, Alan Evangelista <
>> ala...@linux.vnet.ibm.com> wrote:
>>
>>> On 08/18/2014 11:27 AM, Greg Chavez wrote:
>>>
 So I upgraded the cobbler and cobbler-web yum packages from 2.4.4 to
 2.4.7, in preparation for upgrading to 2.6 (this is a RedHat 5.6 system).
 Cobbler works fine from the command line, but I get an error when I attempt
 to login to the Web console.  In /var/log/cobbler, I get this every time I
 access:


 Fri Aug 15 14:59:08 2014 - INFO | Exception occured:
 yaml.parser.ParserError
 Fri Aug 15 14:59:08 2014 - INFO | Exception value: expected
 '', but found ''
   in "", line 2, column 1:
 version_tuple = [2, 4, 7]
 ^


>>> /etc/cobbler/version has incorrect format, it should be in YAML..
>>> Example:
>>>
>>> builddate: Thu Jan 30 21:42:10 2014
>>> gitdate: Mon Dec 9 11:08:16 2013 -0800
>>> gitstamp: 2181fa3
>>> version: 2.5.0
>>> version_tuple: [2, 5, 0]
>>>
>>> It is possible you'll have conflicts with other files. I'd recommend
>>> backing up important data and making a a clean installation.
>>>
>>>
>>> Regards,
>>> Alan Evangelista
>>>
>>> ___
>>> cobbler mailing list
>>> cobbler@lists.fedorahosted.org
>>> https://lists.fedorahosted.org/mailman/listinfo/cobbler
>>>
>>
>>
>>
>> --
>> \*..+.-
>> --Greg Chavez
>> +//..;};
>>
>> ___
>> cobbler mailing list
>> cobbler@lists.fedorahosted.org
>> https://lists.fedorahosted.org/mailman/listinfo/cobbler
>>
>>
>
>
> --
> Grtz,
> Jörgen Maas
>
> ___
> cobbler mailing list
> cobbler@lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/cobbler
>
>


-- 
\*..+.-
--Greg Chavez
+//..;};
___
cobbler mailing list
cobbler@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/cobbler


Re: [cobbler] yaml.parser.ParserError after upgrade to 2.4.7

2014-08-18 Thread Jörgen Maas
The format of the version file changed in 2.6.x (it's now basically ini
format using python ConfigParser)


On Mon, Aug 18, 2014 at 5:14 PM, Greg Chavez  wrote:

> Thanks for your reply, Alan.
>
> I didn't do a find/xargs/grep for version_tuple!  Drat, bad
> troubleshooting. But in any case, even converting that file to YAML doesn't
> seem to help, I just get more errors.
>
> Another interesting thing, the format of /etc/cobbler/version in 2.6.3 is
> not in YAML either.
>
> Whatever. This is only affecting the Web console, so I can stay in
> business while I stand up 2.6 on a new server and replicate.
>
> --Greg
>
>
> On Mon, Aug 18, 2014 at 10:49 AM, Alan Evangelista <
> ala...@linux.vnet.ibm.com> wrote:
>
>> On 08/18/2014 11:27 AM, Greg Chavez wrote:
>>
>>> So I upgraded the cobbler and cobbler-web yum packages from 2.4.4 to
>>> 2.4.7, in preparation for upgrading to 2.6 (this is a RedHat 5.6 system).
>>> Cobbler works fine from the command line, but I get an error when I attempt
>>> to login to the Web console.  In /var/log/cobbler, I get this every time I
>>> access:
>>>
>>>
>>> Fri Aug 15 14:59:08 2014 - INFO | Exception occured:
>>> yaml.parser.ParserError
>>> Fri Aug 15 14:59:08 2014 - INFO | Exception value: expected
>>> '', but found ''
>>>   in "", line 2, column 1:
>>> version_tuple = [2, 4, 7]
>>> ^
>>>
>>>
>> /etc/cobbler/version has incorrect format, it should be in YAML.. Example:
>>
>> builddate: Thu Jan 30 21:42:10 2014
>> gitdate: Mon Dec 9 11:08:16 2013 -0800
>> gitstamp: 2181fa3
>> version: 2.5.0
>> version_tuple: [2, 5, 0]
>>
>> It is possible you'll have conflicts with other files. I'd recommend
>> backing up important data and making a a clean installation.
>>
>>
>> Regards,
>> Alan Evangelista
>>
>> ___
>> cobbler mailing list
>> cobbler@lists.fedorahosted.org
>> https://lists.fedorahosted.org/mailman/listinfo/cobbler
>>
>
>
>
> --
> \*..+.-
> --Greg Chavez
> +//..;};
>
> ___
> cobbler mailing list
> cobbler@lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/cobbler
>
>


-- 
Grtz,
Jörgen Maas
___
cobbler mailing list
cobbler@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/cobbler


Re: [cobbler] yaml.parser.ParserError after upgrade to 2.4.7

2014-08-18 Thread Greg Chavez
Thanks for your reply, Alan.

I didn't do a find/xargs/grep for version_tuple!  Drat, bad
troubleshooting. But in any case, even converting that file to YAML doesn't
seem to help, I just get more errors.

Another interesting thing, the format of /etc/cobbler/version in 2.6.3 is
not in YAML either.

Whatever. This is only affecting the Web console, so I can stay in business
while I stand up 2.6 on a new server and replicate.

--Greg


On Mon, Aug 18, 2014 at 10:49 AM, Alan Evangelista <
ala...@linux.vnet.ibm.com> wrote:

> On 08/18/2014 11:27 AM, Greg Chavez wrote:
>
>> So I upgraded the cobbler and cobbler-web yum packages from 2.4.4 to
>> 2.4.7, in preparation for upgrading to 2.6 (this is a RedHat 5.6 system).
>> Cobbler works fine from the command line, but I get an error when I attempt
>> to login to the Web console.  In /var/log/cobbler, I get this every time I
>> access:
>>
>>
>> Fri Aug 15 14:59:08 2014 - INFO | Exception occured:
>> yaml.parser.ParserError
>> Fri Aug 15 14:59:08 2014 - INFO | Exception value: expected
>> '', but found ''
>>   in "", line 2, column 1:
>> version_tuple = [2, 4, 7]
>> ^
>>
>>
> /etc/cobbler/version has incorrect format, it should be in YAML.. Example:
>
> builddate: Thu Jan 30 21:42:10 2014
> gitdate: Mon Dec 9 11:08:16 2013 -0800
> gitstamp: 2181fa3
> version: 2.5.0
> version_tuple: [2, 5, 0]
>
> It is possible you'll have conflicts with other files. I'd recommend
> backing up important data and making a a clean installation.
>
>
> Regards,
> Alan Evangelista
>
> ___
> cobbler mailing list
> cobbler@lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/cobbler
>



-- 
\*..+.-
--Greg Chavez
+//..;};
___
cobbler mailing list
cobbler@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/cobbler


Re: [cobbler] yaml.parser.ParserError after upgrade to 2.4.7

2014-08-18 Thread Alan Evangelista

On 08/18/2014 11:27 AM, Greg Chavez wrote:
So I upgraded the cobbler and cobbler-web yum packages from 2.4.4 to 
2.4.7, in preparation for upgrading to 2.6 (this is a RedHat 5.6 
system).  Cobbler works fine from the command line, but I get an error 
when I attempt to login to the Web console.  In /var/log/cobbler, I 
get this every time I access:



Fri Aug 15 14:59:08 2014 - INFO | Exception occured:
yaml.parser.ParserError
Fri Aug 15 14:59:08 2014 - INFO | Exception value: expected
'', but found ''
  in "", line 2, column 1:
version_tuple = [2, 4, 7]
^



/etc/cobbler/version has incorrect format, it should be in YAML.. Example:

builddate: Thu Jan 30 21:42:10 2014
gitdate: Mon Dec 9 11:08:16 2013 -0800
gitstamp: 2181fa3
version: 2.5.0
version_tuple: [2, 5, 0]

It is possible you'll have conflicts with other files. I'd recommend 
backing up important data and making a a clean installation.



Regards,
Alan Evangelista

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


Re: [cobbler] yaml.parser.ParserError after upgrade to 2.4.7

2014-08-18 Thread Greg Chavez
I still have this problem. Nobody has a guess? I'm at the point now where I
may have to stand up another cobbler server.

Thanks in advance.

--Greg


On Fri, Aug 15, 2014 at 3:02 PM, Greg Chavez  wrote:

>
> Hello List.
>
> So I upgraded the cobbler and cobbler-web yum packages from 2.4.4 to
> 2.4.7, in preparation for upgrading to 2.6 (this is a RedHat 5.6 system).
>  Cobbler works fine from the command line, but I get an error when I
> attempt to login to the Web console.  In /var/log/cobbler, I get this every
> time I access:
>
> Fri Aug 15 14:59:08 2014 - INFO | Exception occured:
> yaml.parser.ParserError
> Fri Aug 15 14:59:08 2014 - INFO | Exception value: expected ' start>', but found ''
>   in "", line 2, column 1:
> version_tuple = [2, 4, 7]
> ^
> Fri Aug 15 14:59:08 2014 - INFO | Exception Info:
>   File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 2072, in
> _dispatch
> return method_handle(*params)
>File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 1407,
> in extended_version
> return self.api.version(extended=True)
>File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 235, in
> version
> data = yaml.safe_load(ydata)
>File "/usr/lib64/python2.4/site-packages/yaml/__init__.py", line 75, in
> safe_load
> return load(stream, SafeLoader)
>File "/usr/lib64/python2.4/site-packages/yaml/__init__.py", line 58, in
> load
> return loader.get_single_data()
>File "/usr/lib64/python2.4/site-packages/yaml/constructor.py", line 42,
> in get_single_data
> node = self.get_single_node()
>File "/usr/lib64/python2.4/site-packages/yaml/composer.py", line 39, in
> get_single_node
> if not self.check_event(StreamEndEvent):
>File "/usr/lib64/python2.4/site-packages/yaml/parser.py", line 93, in
> check_event
> self.current_event = self.state()
>File "/usr/lib64/python2.4/site-packages/yaml/parser.py", line 169, in
> parse_document_start
> self.peek_token().start_mark)
>
>
> The complete Django output from the Web console can be found here:
> http://pastebin.com/8jPGVnew
>
> Any ideas? I'm used to having to tweak a one or two things after an
> upgrade, but this one has me stumped.
>
> Thanks.
>
> --
> \*..+.-
> --Greg Chavez
> +//..;};
>
___
cobbler mailing list
cobbler@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/cobbler


[cobbler] yaml.parser.ParserError after upgrade to 2.4.7

2014-08-15 Thread Greg Chavez
Hello List.

So I upgraded the cobbler and cobbler-web yum packages from 2.4.4 to 2.4.7,
in preparation for upgrading to 2.6 (this is a RedHat 5.6 system).  Cobbler
works fine from the command line, but I get an error when I attempt to
login to the Web console.  In /var/log/cobbler, I get this every time I
access:

Fri Aug 15 14:59:08 2014 - INFO | Exception occured: yaml.parser.ParserError
Fri Aug 15 14:59:08 2014 - INFO | Exception value: expected '', but found ''
  in "", line 2, column 1:
version_tuple = [2, 4, 7]
^
Fri Aug 15 14:59:08 2014 - INFO | Exception Info:
  File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 2072, in
_dispatch
return method_handle(*params)
   File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 1407, in
extended_version
return self.api.version(extended=True)
   File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 235, in
version
data = yaml.safe_load(ydata)
   File "/usr/lib64/python2.4/site-packages/yaml/__init__.py", line 75, in
safe_load
return load(stream, SafeLoader)
   File "/usr/lib64/python2.4/site-packages/yaml/__init__.py", line 58, in
load
return loader.get_single_data()
   File "/usr/lib64/python2.4/site-packages/yaml/constructor.py", line 42,
in get_single_data
node = self.get_single_node()
   File "/usr/lib64/python2.4/site-packages/yaml/composer.py", line 39, in
get_single_node
if not self.check_event(StreamEndEvent):
   File "/usr/lib64/python2.4/site-packages/yaml/parser.py", line 93, in
check_event
self.current_event = self.state()
   File "/usr/lib64/python2.4/site-packages/yaml/parser.py", line 169, in
parse_document_start
self.peek_token().start_mark)


The complete Django output from the Web console can be found here:
http://pastebin.com/8jPGVnew

Any ideas? I'm used to having to tweak a one or two things after an
upgrade, but this one has me stumped.

Thanks.

-- 
\*..+.-
--Greg Chavez
+//..;};
___
cobbler mailing list
cobbler@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/cobbler