Ubuntu

do-release-upgrade 12.04 to 12.10 gives fatal error

Reported by fisharebest on 2013-04-08
48
This bug affects 7 people
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
High
Brian Murray

Bug Description

I have a 12.04 server installation that I wish to upgrade to 12.10.
This is an Amazon AWS installation, so I must perform this over SSH, rather than at a console.
I edited /etc/update-manager/release-upgrades and changed "Prompt=lts" to "Prompt=normal", and ran do-release-upgrade.

[[[[[[[[[[ START CONSOLE OUTPUT ]]]]]]]]]]
$ sudo do-release-upgrade

Reading cache

Checking package manager

Continue running under SSH?

This session appears to be running under ssh. It is not recommended
to perform a upgrade over ssh currently because in case of failure it
is harder to recover.

If you continue, an additional ssh daemon will be started at port
'1022'.
Do you want to continue?

Continue [yN] y

A fatal error occurred

Please report this as a bug and include the files
/var/log/dist-upgrade/main.log and /var/log/dist-upgrade/apt.log in
your report. The upgrade has aborted.
Your original sources.list was saved in
/etc/apt/sources.list.distUpgrade.

Traceback (most recent call last):

File "/tmp/update-manager-3yWNGP/quantal", line 10, in <module>
sys.exit(main())

File "/tmp/update-manager-3yWNGP/DistUpgrade/DistUpgradeMain.py",
line 240, in main
if app.run():

File
"/tmp/update-manager-3yWNGP/DistUpgrade/DistUpgradeController.py",
line 1764, in run
return self.fullUpgrade()

File
"/tmp/update-manager-3yWNGP/DistUpgrade/DistUpgradeController.py",
line 1616, in fullUpgrade
if not self.prepare():

File
"/tmp/update-manager-3yWNGP/DistUpgrade/DistUpgradeController.py",
line 429, in prepare
self._sshMagic()

File
"/tmp/update-manager-3yWNGP/DistUpgrade/DistUpgradeController.py",
line 299, in _sshMagic
"Do you want to continue?") % port)

File "/tmp/update-manager-3yWNGP/DistUpgrade/DistUpgradeViewText.py",
line 216, in askYesNoQuestion
res = sys.stdin.readline().decode(ENCODING, "backslashreplace")

TypeError: decode() argument 1 must be string, not None
=== Command detached from window (Mon Apr 8 17:18:37 2013) ===
=== Command terminated with exit status 1 (Mon Apr 8 17:18:37 2013) ===
[[[[[[[[[[ END CONSOLE OUTPUT ]]]]]]]]]]

The file /var/log/dist-upgrade/apt.log does not exist. The file /var/log/dist-upgrade/main.log contains the following:

[[[[[[[[[[ START /var/log/dist-upgrade/main.log ]]]]]]]]]]
2013-04-08 17:29:17,567 INFO Using config files '['./DistUpgrade.cfg']'
2013-04-08 17:29:17,567 INFO uname information: 'Linux ip-10-235-87-87 3.2.0-29-virtual #46-Ubuntu SMP Fri Jul 27 17:23:50 UTC 2012 x86_64'
2013-04-08 17:29:17,567 INFO apt version: '0.8.16~exp12ubuntu10.10'
2013-04-08 17:29:17,567 INFO release-upgrader version '0.190.4' started
2013-04-08 17:29:17,661 DEBUG Using 'DistUpgradeViewText' view
2013-04-08 17:29:17,706 DEBUG aufsOptionsAndEnvironmentSetup()
2013-04-08 17:29:17,706 DEBUG using '/tmp/upgrade-rw-NmOHFD' as aufs_rw_dir
2013-04-08 17:29:17,707 DEBUG using '/tmp/upgrade-chroot-XV03IM' as aufs chroot dir
2013-04-08 17:29:17,707 DEBUG enable dpkg --force-overwrite
2013-04-08 17:29:17,725 DEBUG creating statefile: '/var/log/dist-upgrade/apt-clone_system_state.tar.gz'
2013-04-08 17:29:19,514 DEBUG lsb-release: 'precise'
2013-04-08 17:29:21,076 ERROR not handled exception:
Traceback (most recent call last):

  File "/tmp/update-manager-7H8p6y/quantal", line 10, in <module>
    sys.exit(main())

  File "/tmp/update-manager-7H8p6y/DistUpgrade/DistUpgradeMain.py", line 240, in main
    if app.run():

  File "/tmp/update-manager-7H8p6y/DistUpgrade/DistUpgradeController.py", line 1764, in run
    return self.fullUpgrade()

  File "/tmp/update-manager-7H8p6y/DistUpgrade/DistUpgradeController.py", line 1616, in fullUpgrade
    if not self.prepare():

  File "/tmp/update-manager-7H8p6y/DistUpgrade/DistUpgradeController.py", line 429, in prepare
    self._sshMagic()

  File "/tmp/update-manager-7H8p6y/DistUpgrade/DistUpgradeController.py", line 299, in _sshMagic
    "Do you want to continue?") % port)

  File "/tmp/update-manager-7H8p6y/DistUpgrade/DistUpgradeViewText.py", line 216, in askYesNoQuestion
    res = sys.stdin.readline().decode(ENCODING, "backslashreplace")

TypeError: decode() argument 1 must be string, not None

2013-04-08 17:29:21,077 DEBUG enabling apt cron job
[[[[[[[[[[ END /var/log/dist-upgrade/main.log ]]]]]]]]]]

tags: added: dist-upgrade
affects: update-manager (Ubuntu) → ubuntu-release-upgrader (Ubuntu)
Brian Murray (brian-murray) wrote :

Can you post the results of the following commands run in a terminal?

python
import locale
locale.setlocale(locale.LC_ALL, "")
locale.getdefaultlocale()

Thanks in advance!

Changed in ubuntu-release-upgrader (Ubuntu):
status: New → Incomplete
fisharebest (fisharebest) wrote :

Here's the output, as requested:

$ python
Python 2.7.3 (default, Aug 1 2012, 05:14:39)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.setlocale(locale.LC_ALL, "")
'C'
>>> locale.getdefaultlocale()
(None, None)
>>>

...and in case this is your next question,

$ set | grep LC_
LC_ADDRESS=en_GB.UTF-8
LC_ALL=C
LC_IDENTIFICATION=en_GB.UTF-8
LC_MEASUREMENT=en_GB.UTF-8
LC_MONETARY=en_GB.UTF-8
LC_NAME=en_GB.UTF-8
LC_NUMERIC=en_GB.UTF-8
LC_PAPER=en_GB.UTF-8
LC_TELEPHONE=en_GB.UTF-8
LC_TIME=en_GB.UTF-8

Sasa Paporovic (melchiaros) wrote :

@fisharebest

Hi, thank you for reporting.

One hint to accelerate a handling:

It ishelpfull to set the status of the report back from incomplete if a requested information is provided.

Oh, well, let me do it for you this time.

greetings

 melchiaros

Changed in ubuntu-release-upgrader (Ubuntu):
status: Incomplete → New
Changed in ubuntu-release-upgrader (Ubuntu):
status: New → In Progress
importance: Undecided → High
assignee: nobody → Brian Murray (brian-murray)
Robie Basak (racb) wrote :

I am also affected. My results are the same as fisharebest's inside Python. Outside, I get:

$ set|grep LC_
LC_COLLATE=C
    local LC_CTYPE=C;

I believe I installed this system with a preseed that says:

d-i debian-installer/locale string C
d-i pkgsel/install-language-support boolean false
d-i pkgsel/language-pack-patterns string

Robie Basak (racb) wrote :

Workaround:

sudo LC_ALL=C.UTF-8 sudo do-release-upgrade

worked for me.

fisharebest (fisharebest) wrote :

@RobieBasak - thanks for the hint. I did it this way.

export LC_ALL=C.UTF-8
sudo do-release-upgrade

@BrianMurray - I have a "pre-upgrade" backup, so if you'd like me to test any code fix, just ask.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-release-upgrader - 1:0.192.8

---------------
ubuntu-release-upgrader (1:0.192.8) raring; urgency=low

  * fallback to UTF-8 if getdefaultlocale returns None (LP: #1166346)
 -- Brian Murray <email address hidden> Wed, 10 Apr 2013 10:49:50 -0700

Changed in ubuntu-release-upgrader (Ubuntu):
status: In Progress → Fix Released
1000Gbps (1000gbps) wrote :

Nope, it's not fixed. I even can't remove packages...

apt-get dist-upgrade
-----
-----
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 118, in <module>
    main()
  File "/usr/bin/pyclean", line 92, in main
    d.next() # initialize coroutine
AttributeError: 'generator' object has no attribute 'next'
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 118, in <module>
    main()
  File "/usr/bin/pyclean", line 92, in main
    d.next() # initialize coroutine
AttributeError: 'generator' object has no attribute 'next'
dpkg: error processing /var/cache/apt/archives/debconf_1.5.49ubuntu1_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 289, in <module>
    main()
  File "/usr/bin/pycompile", line 231, in main
    versions = get_requested_versions(options.vrange, available=True)
  File "/usr/share/python/debpython/version.py", line 72, in get_requested_versions
    if isinstance(vrange, basestring):
NameError: global name 'basestring' is not defined
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/debconf_1.5.49ubuntu1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I don't get it why the fuck developers don't test their creations. Just for the protocol I tried to upgrade from 12.10 to 13.04; my python is 3.2.3 which I CAN'T REMOVE but obviously scripts are for python2.7. Now I should do a clean install -> lost 2 or 3 days to restore the whole system including ~40GB database and stopping our internal VPN server!

Thank you!!!

Robie Basak (racb) wrote :

@1000Gbps

I think you have a different issue there - none of the error messages match up with the error messages produced by this bug, and your problem is with a different package. It also looks like it could be a local configuration issue, rather than a bug.

I suggest you try community support options. Details are at http://www.ubuntu.com/support/community. It's also wise to test production server upgrades before rolling them out.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers