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

vagrant up build: multiple errors upgrading packages, installing prereqs, setting up go #9763

Closed
steven-collins-omega opened this issue Nov 1, 2016 · 7 comments
Labels
bug build Auto-pinning

Comments

@steven-collins-omega
Copy link

Expected Behavior

What should have happened?

A Vagrant box with a working build environment should have been set up.

Actual Behavior

What actually happened?

go and related tools are not installed correctly:

vagrant@terraform:/opt/gopath/src/github.com/hashicorp/terraform$ make test
==> Checking that code complies with gofmt requirements...
/opt/gopath/src/github.com/hashicorp/terraform/scripts/gofmtcheck.sh: line 5: gofmt: command not found
==> Checking AWS provider for unchecked errors...
==> NOTE: at this time we only look for uncheck errors in the AWS package
==> Installing errcheck...
/opt/gopath/src/github.com/hashicorp/terraform/scripts/errcheck.sh: line 9: go: command not found
/opt/gopath/src/github.com/hashicorp/terraform/scripts/errcheck.sh: line 16: errcheck: command not found
/bin/sh: 2: go: not found
make: *** [generate] Error 127

Steps to Reproduce

Simply follow the instructions in BUILDING.md.

Important Factoids

Here is the last part of the output of vagrant up:

==> default: Upgrading packages ...
==> default: W: Size of file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_trusty-security_main_source_Sources.gz is not what the server reported 152472 152862
==> default: 
==> default: Current default time zone: 'Etc/UTC'
==> default: Local time is now:      Tue Nov  1 03:50:31 UTC 2016.
==> default: Universal Time is now:  Tue Nov  1 03:50:31 UTC 2016.
==> default: Run 'dpkg-reconfigure tzdata' if you wish to change it.
==> default: invoke-rc.d: policy-rc.d denied execution of stop.
==> default: 
==> default: Configuration file '/etc/sudoers'
==> default:  ==> Modified (by you or by a script) since installation.
==> default:  ==> Package distributor has shipped an updated version.
==> default:    What would you like to do about it ?  Your options are:
==> default:     Y or I  : install the package maintainer's version
==> default:     N or O  : keep your currently-installed version
==> default:       D     : show the differences between the versions
==> default:       Z     : start a shell to examine the situation
==> default:  The default action is to keep your current version.
==> default: *** sudoers (Y/I/N/O/D/Z) [default=N] ? 
==> default: 
==> default: Configuration file '/etc/sudoers'
==> default:  ==> Modified (by you or by a script) since installation.
==> default:  ==> Package distributor has shipped an updated version.
==> default:    What would you like to do about it ?  Your options are:
==> default:     Y or I  : install the package maintainer's version
==> default:     N or O  : keep your currently-installed version
==> default:       D     : show the differences between the versions
==> default:       Z     : start a shell to examine the situation
==> default:  The default action is to keep your current version.
==> default: *** sudoers (Y/I/N/O/D/Z) [default=N] ? dpkg: error processing package sudo (--configure):
==> default:  EOF on stdin at conffile prompt
==> default: Errors were encountered while processing:
==> default:  sudo
==> default: E: Sub-process /usr/bin/dpkg returned an error code (1)
==> default: Installing prerequisites ...
Extracting templates from packages: 71%
Extracting templates from packages: 100%
==> default: 
==> default: Configuration file '/etc/sudoers'
==> default:  ==> Modified (by you or by a script) since installation.
==> default:  ==> Package distributor has shipped an updated version.
==> default:    What would you like to do about it ?  Your options are:
==> default:     Y or I  : install the package maintainer's version
==> default:     N or O  : keep your currently-installed version
==> default:       D     : show the differences between the versions
==> default:       Z     : start a shell to examine the situation
==> default:  The default action is to keep your current version.
==> default: *** sudoers (Y/I/N/O/D/Z) [default=N] ? 
==> default: dpkg: error processing package sudo (--configure):
==> default:  EOF on stdin at conffile prompt
==> default: 
==> default: Creating config file /etc/mercurial/hgrc.d/hgext.rc with new version
==> default: Errors were encountered while processing:
==> default:  sudo
==> default: E: Sub-process /usr/bin/dpkg returned an error code (1)
==> default: Downloading go (1.7.3) ...
==> default: Setting up go (1.7.3) ...
==> default: install: cannot stat '/dev/stdin': Stale file handle

References

git bisect indicates that this failure was introduced at PR #8762.

@kwilczynski
Copy link
Contributor

@steven-collins-omega hi there! I am sorry that your are having issues.

Let me look into fixing this.

@aseemrb
Copy link

aseemrb commented Nov 1, 2016

I'm having the exact same issue, in the same sudoers configuration file. Looks like we need an auto confirm flag for reinstalling the config files if it is modified by some script and this option pops up.

@kwilczynski
Copy link
Contributor

@Aseemraj hi there! Sorry to about the issues!

Yes, precisely, we need to accept upstream configuration changes to the files which are normally set to be protected by the package maintainers.

@aseemrb
Copy link

aseemrb commented Nov 1, 2016

@kwilczynski I think in the vagrant file, wherever we have apt-get update and upgrade, we can use one of these flags:

  1. -o Dpkg::Options::="--force-confnew"
  2. -o Dpkg::Options::="--force-confdef"
  3. -o Dpkg::Options::="--force-confold"

This line can include these additional options and it should be good to go as I figure.

@kwilczynski
Copy link
Contributor

@steven-collins-omega @Aseemraj hi there! Apologies for the delay.

I have opened a Pull Request that contains fixes which should resolve this issue.

@stack72 stack72 added bug build Auto-pinning labels Nov 2, 2016
@stack72
Copy link
Contributor

stack72 commented Dec 7, 2016

Closed via #9783

@stack72 stack72 closed this as completed Dec 7, 2016
dbarach pushed a commit to fdio-stack/vpp-mirror that referenced this issue Dec 21, 2016
The dpkg sudo trigger appears to want to run interactively despite the noninteractive
debconf setting. This is a problem upstream for vagrant also, see.

hashicorp/terraform#9763

Incorporating the recommended fix to Vagrantfile from upstream

hashicorp/terraform#9783

Change-Id: I8da8522fc9e80fc3bd268b347a786054ad019170
Signed-off-by: Ray Kinsella <ray.kinsella@intel.com>
@ghost
Copy link

ghost commented Apr 19, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug build Auto-pinning
Projects
None yet
Development

No branches or pull requests

4 participants