Azure-Samples / azuresandbox

Stand up an Azure sandbox environment for accelerating your projects in an hour.
MIT License
76 stars 39 forks source link

One time Linux didn't add to Active Directory #1

Closed esaadat closed 1 year ago

esaadat commented 1 year ago

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Run terraform-azurerm-vnet-app

Any log messages given by the failure

Created symlink /etc/systemd/system/multi-user.target.wants/smbd.service → /lib/systemd/system/smbd.service. samba-ad-dc.service is a disabled or a static unit, not starting it. Processing triggers for ufw (0.36.1-4ubuntu0.1) ... Processing triggers for man-db (2.10.2-1) ... Processing triggers for dbus (1.12.20-2ubuntu4.1) ... Processing triggers for libc-bin (2.35-0ubuntu3.1) ... NEEDRESTART-VER: 3.5 NEEDRESTART-KCUR: 5.15.0-1041-azure NEEDRESTART-KEXP: 5.15.0-1041-azure NEEDRESTART-KSTA: 1 NEEDRESTART-SVC: packagekit.service NEEDRESTART-SVC: unattended-upgrades.service Cloud-init v. 23.2.2-0ubuntu0~22.04.1 running 'modules:final' at Tue, 22 Aug 2023 00:35:27 +0000. Up 428.54 seconds. 20230822T0035297908Z : NuGet Powershell Package Provider version 3.0.0.1 is already installed... 20230822T0035309337Z : Setting PSGallery installation policy to 'Trusted'... 20230822T0035322430Z : Installing PowerShell Az module... 20230822T0036109823Z : PowerShell Az.Automation version 1.9.1 is installed... /var/lib/cloud/instance/scripts/configure-vm-jumpbox-linux.sh: line 30: $log_fileprintdiv: ambiguous redirect % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed

% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed

tkey query failed: GSSAPI error: Major = No credentials were supplied, or the credentials were unavailable or inaccessible, Minor = SPNEGO cannot find mechanisms to negotiate. id: ‘bootstrapadmin@mysandbox.local’: no such user Cloud-init v. 23.2.2-0ubuntu0~22.04.1 finished at Tue, 22 Aug 2023 00:36:15 +0000. Datasource DataSourceAzure [seed=/dev/sr0]. Up 476.86 seconds Cloud-init v. 23.2.2-0ubuntu0~22.04.1 running 'init-local' at Tue, 22 Aug 2023 01:35:07 +0000. Up 7.05 seconds. Cloud-init v. 23.2.2-0ubuntu0~22.04.1 running 'init' at Tue, 22 Aug 2023 01:35:09 +0000. Up 9.74 seconds. ci-info: ++++++++++++++++++++++++++++++++++++++Net device info+++++++++++++++++++++++++++++++++++++++ ci-info: +--------+------+-----------------------------+---------------+--------+-------------------+ ci-info: | Device | Up | Address | Mask | Scope | Hw-Address | ci-info: +--------+------+-----------------------------+---------------+--------+-------------------+ ci-info: | eth0 | True | 10.2.0.4 | 255.255.255.0 | global | 00:0d:3a:8d:34:c6 | ci-info: | eth0 | True | fe80::20d:3aff:fe8d:34c6/64 | . | link | 00:0d:3a:8d:34:c6 | ci-info: | lo | True | 127.0.0.1 | 255.0.0.0 | host | . | ci-info: | lo | True | ::1/128 | . | host | . | ci-info: +--------+------+-----------------------------+---------------+--------+-------------------+

Expected/desired behavior

to see jumplinux1 in the computers container in the mysandbox.local active directory.

OS and Version?

Linux Ubuntu 22.04

Versions

Mention any other details that might be useful

I destroyed the environment and re-deployed and it worked. Just wanted to report the issue.

doherty100 commented 1 year ago

@esaadat thanks for reporting the issue you encountered. What release of #AzureSandbox were you using when you provisioned vnet-app? There were several bugs associated with upgrading to Ubuntu 22.04 that were fixed in subsequent releases. The most recent release is v2.6.5.

esaadat commented 1 year ago

I used v2.6.4 but as I mentioned upon running it again it worked. Also something that I had to add to every 010-common.tf file at the end of Providers section was to add this: skip_provider_registration = true

Otherwise mine didn't work.

Thanks again.

doherty100 commented 1 year ago

@esaadat , regarding provider registration, see #4440. I'll add this to known issues in case anybody else hits it. Thanks for calling this out. Regarding the other issue (jumplinux1 not showing up in AD) I'm glad a redeploy worked for you. If it happens again please open a new issue and keep the existing environment in place so we can pull some logs etc.

doherty100 commented 1 year ago

Closing this issue due to inability to reproduce failure.

doherty100 commented 1 year ago

Reopening this issue. This is a transient failure and I have a repro on v2.6.5 of Azure Sandbox. The following errors were in /var/log/cloud-init-output.log and were generated during execution of configure-vm-jumpbox-linux.sh

tkey query failed: GSSAPI error: Major = No credentials were supplied, or the credentials were unavailable or inaccessible, Minor = SPNEGO cannot find mechanisms to  negotiate.
id: ‘bootstrapadmin@mysandbox.local’: no such user
doherty100 commented 1 year ago

As a temporary mitigation to avoid having to redeploy use the following steps:

git clone https://github.com/Azure-Samples/azuresandbox
cd azuresandbox/terraform-azurerm-vnet-app
chmod 755 configure-vm-jumpbox-linux.sh
sudo ./configure-vm-jumpbox-linux.sh
doherty100 commented 1 year ago

Closing this as duplicate of issue [2}(https://github.com/Azure-Samples/azuresandbox/issues/2)