Re: [packer] 16031 Terminated sudo shutdown -r now

2019-08-06 Thread Rickard von Essen
Most of the time it's not necessary to run a reboot during provisioning,
instead just install the updates and disable ipv6 (whatever there can be
any reasons to do that). When you start the image created from this build
it should start with the new kernel and ipv6 disabled.

On Mon, Aug 5, 2019 at 11:05 PM sasha.meltser 
wrote:

> I am disabling IPv6 and running dracut to update kernel and need to reboot
> so VM don't boot with IPv6 enabled after kernel updated
>
> On Monday, August 5, 2019 at 3:02:23 PM UTC-6, Rickard von Essen wrote:
>>
>> Is there any good reason why you need to reboot a GCE instance during
>> provisioning?
>>
>> On Mon, Aug 5, 2019, 22:31 sasha.meltser  wrote:
>>
>>> Thank you  for replying
>>>
>>> this is what i see in logs
>>>
>>> [1;32m==> googlecompute: Provisioning with shell script:
>>> /var/folders/2q/dmvlb7w13fnfh_xlwwrt2ytmgn/T/packer-shell683874453
>>>
>>> [1;31m==> googlecompute: /tmp/script_9664.sh: line 2: 16050 Terminated
>>> sudo reboot
>>>
>>> [1;32m==> googlecompute: Deleting instance...
>>>
>>> [0;32mgooglecompute: Instance has been deleted!
>>>
>>> [1;32m==> googlecompute: Deleting disk...
>>>
>>> [0;32mgooglecompute: Disk has been deleted!
>>>
>>> [1;31mBuild 'googlecompute' errored: Script exited with non-zero exit
>>> status: 143.Allowed exit codes are: [0]
>>>
>>>
>>> and this is snippet from json
>>>
>>> "provisioners": [
>>> {
>>> "type": "shell",
>>> "scripts": [
>>> "./postscripts/common/disable-ipv6.sh"
>>>]
>>>   },
>>> {
>>> "type": "shell",
>>> "inline": ["sudo reboot"],
>>> "expect_disconnect": true
>>> },
>>> {
>>> "type": "shell",
>>> "scripts": [
>>> "./postscripts/common/common.sh",
>>>   "./postscripts/gui/gnome.sh"
>>>]
>>>   }
>>>
>>> its failing after reboot.
>>>
>>> On Monday, August 5, 2019 at 2:20:43 PM UTC-6, Rickard von Essen wrote:

 How does it fail? Please provide some more context.

 On Mon, Aug 5, 2019, 20:06 sasha.meltser 
 wrote:

> I am trying to provision CIS CentOS 7 image and its failing when I do
> basic reboot. Any advice please
>
> {
> "type": "shell",
> "inline": ["sudo shutdown -r now"],
> "expect_disconnect": true
> },
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines
> - https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to the Google
> Groups "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to packe...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/packer-tool/b6312147-84f7-45de-8ffb-5a28f5836c4b%40googlegroups.com
> 
> .
>
 --
>>> This mailing list is governed under the HashiCorp Community Guidelines -
>>> https://www.hashicorp.com/community-guidelines.html. Behavior in
>>> violation of those guidelines may result in your removal from this mailing
>>> list.
>>>
>>> GitHub Issues: https://github.com/mitchellh/packer/issues
>>> IRC: #packer-tool on Freenode
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Packer" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to packe...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/packer-tool/cd54a1ae-16d6-48ca-9d94-7a02e3c6b1a4%40googlegroups.com
>>> 
>>> .
>>>
>> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to packer-tool+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/packer-tool/62c63036-0c9d-4841-b390-fff7442212af%40googlegroups.com
> 
> .
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in 

Re: [packer] 16031 Terminated sudo shutdown -r now

2019-08-05 Thread sasha.meltser
I am disabling IPv6 and running dracut to update kernel and need to reboot 
so VM don't boot with IPv6 enabled after kernel updated

On Monday, August 5, 2019 at 3:02:23 PM UTC-6, Rickard von Essen wrote:
>
> Is there any good reason why you need to reboot a GCE instance during 
> provisioning? 
>
> On Mon, Aug 5, 2019, 22:31 sasha.meltser  > wrote:
>
>> Thank you  for replying
>>
>> this is what i see in logs
>>
>> [1;32m==> googlecompute: Provisioning with shell script: 
>> /var/folders/2q/dmvlb7w13fnfh_xlwwrt2ytmgn/T/packer-shell683874453
>>
>> [1;31m==> googlecompute: /tmp/script_9664.sh: line 2: 16050 Terminated  
>> sudo reboot
>>
>> [1;32m==> googlecompute: Deleting instance...
>>
>> [0;32mgooglecompute: Instance has been deleted!
>>
>> [1;32m==> googlecompute: Deleting disk...
>>
>> [0;32mgooglecompute: Disk has been deleted!
>>
>> [1;31mBuild 'googlecompute' errored: Script exited with non-zero exit 
>> status: 143.Allowed exit codes are: [0]
>>
>>
>> and this is snippet from json
>>
>> "provisioners": [
>> {
>> "type": "shell",
>> "scripts": [
>> "./postscripts/common/disable-ipv6.sh"
>>]
>>   },
>> {
>> "type": "shell",
>> "inline": ["sudo reboot"],
>> "expect_disconnect": true
>> }, 
>> {
>> "type": "shell",
>> "scripts": [
>> "./postscripts/common/common.sh",
>>   "./postscripts/gui/gnome.sh"
>>]
>>   }
>>
>> its failing after reboot.
>>
>> On Monday, August 5, 2019 at 2:20:43 PM UTC-6, Rickard von Essen wrote:
>>>
>>> How does it fail? Please provide some more context. 
>>>
>>> On Mon, Aug 5, 2019, 20:06 sasha.meltser  wrote:
>>>
 I am trying to provision CIS CentOS 7 image and its failing when I do 
 basic reboot. Any advice please

 {
 "type": "shell",
 "inline": ["sudo shutdown -r now"],
 "expect_disconnect": true
 }, 

 -- 
 This mailing list is governed under the HashiCorp Community Guidelines 
 - https://www.hashicorp.com/community-guidelines.html. Behavior in 
 violation of those guidelines may result in your removal from this mailing 
 list.
  
 GitHub Issues: https://github.com/mitchellh/packer/issues
 IRC: #packer-tool on Freenode
 --- 
 You received this message because you are subscribed to the Google 
 Groups "Packer" group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to packe...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/packer-tool/b6312147-84f7-45de-8ffb-5a28f5836c4b%40googlegroups.com
  
 
 .

>>> -- 
>> This mailing list is governed under the HashiCorp Community Guidelines - 
>> https://www.hashicorp.com/community-guidelines.html. Behavior in 
>> violation of those guidelines may result in your removal from this mailing 
>> list.
>>  
>> GitHub Issues: https://github.com/mitchellh/packer/issues
>> IRC: #packer-tool on Freenode
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Packer" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to packe...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/packer-tool/cd54a1ae-16d6-48ca-9d94-7a02e3c6b1a4%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/62c63036-0c9d-4841-b390-fff7442212af%40googlegroups.com.


Re: [packer] 16031 Terminated sudo shutdown -r now

2019-08-05 Thread Rickard von Essen
Is there any good reason why you need to reboot a GCE instance during
provisioning?

On Mon, Aug 5, 2019, 22:31 sasha.meltser  wrote:

> Thank you  for replying
>
> this is what i see in logs
>
> [1;32m==> googlecompute: Provisioning with shell script:
> /var/folders/2q/dmvlb7w13fnfh_xlwwrt2ytmgn/T/packer-shell683874453
>
> [1;31m==> googlecompute: /tmp/script_9664.sh: line 2: 16050 Terminated
>   sudo reboot
>
> [1;32m==> googlecompute: Deleting instance...
>
> [0;32mgooglecompute: Instance has been deleted!
>
> [1;32m==> googlecompute: Deleting disk...
>
> [0;32mgooglecompute: Disk has been deleted!
>
> [1;31mBuild 'googlecompute' errored: Script exited with non-zero exit
> status: 143.Allowed exit codes are: [0]
>
>
> and this is snippet from json
>
> "provisioners": [
> {
> "type": "shell",
> "scripts": [
> "./postscripts/common/disable-ipv6.sh"
>]
>   },
> {
> "type": "shell",
> "inline": ["sudo reboot"],
> "expect_disconnect": true
> },
> {
> "type": "shell",
> "scripts": [
> "./postscripts/common/common.sh",
>   "./postscripts/gui/gnome.sh"
>]
>   }
>
> its failing after reboot.
>
> On Monday, August 5, 2019 at 2:20:43 PM UTC-6, Rickard von Essen wrote:
>>
>> How does it fail? Please provide some more context.
>>
>> On Mon, Aug 5, 2019, 20:06 sasha.meltser  wrote:
>>
>>> I am trying to provision CIS CentOS 7 image and its failing when I do
>>> basic reboot. Any advice please
>>>
>>> {
>>> "type": "shell",
>>> "inline": ["sudo shutdown -r now"],
>>> "expect_disconnect": true
>>> },
>>>
>>> --
>>> This mailing list is governed under the HashiCorp Community Guidelines -
>>> https://www.hashicorp.com/community-guidelines.html. Behavior in
>>> violation of those guidelines may result in your removal from this mailing
>>> list.
>>>
>>> GitHub Issues: https://github.com/mitchellh/packer/issues
>>> IRC: #packer-tool on Freenode
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Packer" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to packe...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/packer-tool/b6312147-84f7-45de-8ffb-5a28f5836c4b%40googlegroups.com
>>> 
>>> .
>>>
>> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to packer-tool+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/packer-tool/cd54a1ae-16d6-48ca-9d94-7a02e3c6b1a4%40googlegroups.com
> 
> .
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CALz9Rt8B11rCih-0upEpPhz-nPjmONxtm5uuiDa_R-9BfA9%2BHA%40mail.gmail.com.


Re: [packer] 16031 Terminated sudo shutdown -r now

2019-08-05 Thread sasha.meltser
Thank you  for replying

this is what i see in logs

[1;32m==> googlecompute: Provisioning with shell script: 
/var/folders/2q/dmvlb7w13fnfh_xlwwrt2ytmgn/T/packer-shell683874453

[1;31m==> googlecompute: /tmp/script_9664.sh: line 2: 16050 Terminated  
sudo reboot

[1;32m==> googlecompute: Deleting instance...

[0;32mgooglecompute: Instance has been deleted!

[1;32m==> googlecompute: Deleting disk...

[0;32mgooglecompute: Disk has been deleted!

[1;31mBuild 'googlecompute' errored: Script exited with non-zero exit 
status: 143.Allowed exit codes are: [0]


and this is snippet from json

"provisioners": [
{
"type": "shell",
"scripts": [
"./postscripts/common/disable-ipv6.sh"
   ]
  },
{
"type": "shell",
"inline": ["sudo reboot"],
"expect_disconnect": true
}, 
{
"type": "shell",
"scripts": [
"./postscripts/common/common.sh",
  "./postscripts/gui/gnome.sh"
   ]
  }

its failing after reboot.

On Monday, August 5, 2019 at 2:20:43 PM UTC-6, Rickard von Essen wrote:
>
> How does it fail? Please provide some more context. 
>
> On Mon, Aug 5, 2019, 20:06 sasha.meltser  > wrote:
>
>> I am trying to provision CIS CentOS 7 image and its failing when I do 
>> basic reboot. Any advice please
>>
>> {
>> "type": "shell",
>> "inline": ["sudo shutdown -r now"],
>> "expect_disconnect": true
>> }, 
>>
>> -- 
>> This mailing list is governed under the HashiCorp Community Guidelines - 
>> https://www.hashicorp.com/community-guidelines.html. Behavior in 
>> violation of those guidelines may result in your removal from this mailing 
>> list.
>>  
>> GitHub Issues: https://github.com/mitchellh/packer/issues
>> IRC: #packer-tool on Freenode
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Packer" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to packe...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/packer-tool/b6312147-84f7-45de-8ffb-5a28f5836c4b%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/cd54a1ae-16d6-48ca-9d94-7a02e3c6b1a4%40googlegroups.com.


Re: [packer] 16031 Terminated sudo shutdown -r now

2019-08-05 Thread Rickard von Essen
How does it fail? Please provide some more context.

On Mon, Aug 5, 2019, 20:06 sasha.meltser  wrote:

> I am trying to provision CIS CentOS 7 image and its failing when I do
> basic reboot. Any advice please
>
> {
> "type": "shell",
> "inline": ["sudo shutdown -r now"],
> "expect_disconnect": true
> },
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to packer-tool+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/packer-tool/b6312147-84f7-45de-8ffb-5a28f5836c4b%40googlegroups.com
> 
> .
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CALz9Rt9hHxo7bz__cyV4a-E7oev7%2BVjKCn91xwDYTepcq01pOQ%40mail.gmail.com.


[packer] 16031 Terminated sudo shutdown -r now

2019-08-05 Thread sasha.meltser
I am trying to provision CIS CentOS 7 image and its failing when I do basic 
reboot. Any advice please

{
"type": "shell",
"inline": ["sudo shutdown -r now"],
"expect_disconnect": true
}, 

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/b6312147-84f7-45de-8ffb-5a28f5836c4b%40googlegroups.com.