Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[xenial] Investigate noninteractive do-release-upgrade #3968

Closed
eloquence opened this issue Dec 4, 2018 · 10 comments
Closed

[xenial] Investigate noninteractive do-release-upgrade #3968

eloquence opened this issue Dec 4, 2018 · 10 comments
Milestone

Comments

@eloquence
Copy link
Member

Once we have addressed all blocking issues for the Xenial migration, we should perform a timeboxed investigation to determine whether it is feasible to perform a noninteractive upgrade.

It is unlikely that we would force the upgrade, but even for a manual upgrade (initiated, for example, via securedrop-admin), it would be ideal to minimize manual steps, which are error-prone and could result in inconsistent system configurations if users make choices different from the documented ones.

This would also unblock automated Trusty->Xenial upgrade testing.

Part of #3204.

@eloquence
Copy link
Member Author

See @zenmonkeykstop’s suggestion here: #3204 (comment)

@kushaldas
Copy link
Contributor

Error I got today.

do_release_upgrade_erro2

@kushaldas
Copy link
Contributor

The above error can be an one time thing. I just wanted that to be documented.

@redshiftzero
Copy link
Contributor

Any idea why this error would be happening?

@kushaldas
Copy link
Contributor

Any idea why this error would be happening?

The error is due to my ISP it seems :(

@kushaldas
Copy link
Contributor

I was trying the command mentioned in that playbook (pointed by @zenmonkeykstop ), it still asked for user input and later gave this error.

Configuration file '/etc/modprobe.d/blacklist.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** blacklist.conf (Y/I/N/O/D/Z) [default=N] ? 
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 15, in <module>
    import xml.dom, xml.dom.minidom
ImportError: No module named 'xml.dom'

Original exception was:
Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-_0fp6stt/xenial", line 8, in <module>
    sys.exit(main())
  File "/tmp/ubuntu-release-upgrader-_0fp6stt/DistUpgrade/DistUpgradeMain.py", line 242, in main
    if app.run():
  File "/tmp/ubuntu-release-upgrader-_0fp6stt/DistUpgrade/DistUpgradeController.py", line 1907, in run
    return self.fullUpgrade()
  File "/tmp/ubuntu-release-upgrader-_0fp6stt/DistUpgrade/DistUpgradeController.py", line 1872, in fullUpgrade
    if not self.doDistUpgrade():
  File "/tmp/ubuntu-release-upgrader-_0fp6stt/DistUpgrade/DistUpgradeController.py", line 1213, in doDistUpgrade
    res = self.cache.commit(fprogress,iprogress)
  File "/tmp/ubuntu-release-upgrader-_0fp6stt/DistUpgrade/DistUpgradeCache.py", line 286, in commit
    apt.Cache.commit(self, fprogress, iprogress)
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 534, in commit
    # which is less than optimal!
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 498, in install_archives
    
  File "/tmp/ubuntu-release-upgrader-_0fp6stt/DistUpgrade/DistUpgradeView.py", line 234, in run
    res = os.WEXITSTATUS(self.wait_child())
  File "/tmp/ubuntu-release-upgrader-_0fp6stt/DistUpgrade/DistUpgradeView.py", line 200, in wait_child
    self.update_interface()
  File "/tmp/ubuntu-release-upgrader-_0fp6stt/DistUpgrade/DistUpgradeViewNonInteractive.py", line 221, in update_interface
    os.write(self.master_fd,chr(3))
TypeError: 'str' does not support the buffer interface

@kushaldas
Copy link
Contributor

do-release-upgrade -f DistUpgradeViewNonInteractive

Gave me the following error (after user input).

Setting up kmod (22-1ubuntu5.1) ...                                                                                                                  [25/1860]
Installing new version of config file /etc/init.d/kmod ...
Installing new version of config file /etc/modprobe.d/blacklist-framebuffer.conf ...

Configuration file '/etc/modprobe.d/blacklist.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** blacklist.conf (Y/I/N/O/D/Z) [default=N] ? Y
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 15, in <module>
    import xml.dom, xml.dom.minidom
ImportError: No module named 'xml.dom'

Original exception was:
Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-7bqopzdr/xenial", line 8, in <module>
    sys.exit(main())
  File "/tmp/ubuntu-release-upgrader-7bqopzdr/DistUpgrade/DistUpgradeMain.py", line 242, in main
    if app.run():
  File "/tmp/ubuntu-release-upgrader-7bqopzdr/DistUpgrade/DistUpgradeController.py", line 1907, in run
    return self.fullUpgrade()
  File "/tmp/ubuntu-release-upgrader-7bqopzdr/DistUpgrade/DistUpgradeController.py", line 1872, in fullUpgrade
    if not self.doDistUpgrade():
  File "/tmp/ubuntu-release-upgrader-7bqopzdr/DistUpgrade/DistUpgradeController.py", line 1213, in doDistUpgrade
    res = self.cache.commit(fprogress,iprogress)
  File "/tmp/ubuntu-release-upgrader-7bqopzdr/DistUpgrade/DistUpgradeCache.py", line 286, in commit
    apt.Cache.commit(self, fprogress, iprogress)
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 534, in commit
    # which is less than optimal!
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 498, in install_archives
    
  File "/tmp/ubuntu-release-upgrader-7bqopzdr/DistUpgrade/DistUpgradeView.py", line 234, in run
    res = os.WEXITSTATUS(self.wait_child())
  File "/tmp/ubuntu-release-upgrader-7bqopzdr/DistUpgrade/DistUpgradeView.py", line 200, in wait_child
    self.update_interface()
  File "/tmp/ubuntu-release-upgrader-7bqopzdr/DistUpgrade/DistUpgradeViewNonInteractive.py", line 221, in update_interface
    os.write(self.master_fd,chr(3))
TypeError: 'str' does not support the buffer interface

I was trying to identify ways to fully unattended upgrade to xenial.

@kushaldas
Copy link
Contributor

kushaldas commented Jan 9, 2019

The required xml.dom package comes from the Python standard library, installing any such xml package on Trusty did not help to solve this issue. I am guessing there is another xml.py in the import path, which is shadowing the original package.

Even if Python3.4 and related minimal package is installed on Trusty, the upgrade still fails on the above mentioned error.

@kushaldas
Copy link
Contributor

Note: pexpect seems to be not helpful in this case, I could not manage to provide input as required to the do-release-upgrade command.

@eloquence
Copy link
Member Author

We've agreed that we'll focus on providing solid step-by-step docs (#4057) instead; the notes in #3965 can provide a starting point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants