Skip to content

Commit cc00619

Browse files
author
Clark Perkins
committed
Fixed bug in stackdio init command
1 parent e66e92e commit cc00619

4 files changed

Lines changed: 8 additions & 5 deletions

File tree

packer/build.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@
7373
{
7474
"type": "shell",
7575
"script": "packer/install.sh",
76-
"execute_command": "{{ .Vars }} STACKDIO_VERSION={{ user `version` }} sudo -E sh '{{ .Path }}'"
76+
"execute_command": "sudo su - root -c \"{{ .Vars }} STACKDIO_VERSION={{ user `version` }} sh '{{ .Path }}'\""
7777
},
7878
{
7979
"type": "shell",
8080
"script": "packer/configure.sh",
81-
"execute_command": "{{ .Vars }} sudo su - stackdio -c \"sh '{{ .Path }}'\""
81+
"execute_command": "sudo su - stackdio -c \"{{ .Vars }} sh '{{ .Path }}'\""
8282
},
8383
{
8484
"type": "shell",

packer/configure.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ stackdio init <<EOF
66
stackdio
77
/var/lib/stackdio
88
curl-bootstrap
9-
9+
stable {salt_version}
1010
mysql://stackdio:password@localhost:3306/stackdio
1111
true
1212
yes

stackdio/api/stacks/serializers.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ def update(self, stack, validated_data):
7474
# This is a PUT, so just add the data directly
7575
stack.properties = validated_data
7676

77+
# Regenerate the pillar file now too
78+
stack.generate_pillar_file()
79+
7780
# Be sure to save the instance
7881
stack.save()
7982

stackdio/server/management/commands.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,9 @@ def __init__(self, *args, **kwargs):
282282
'short_desc': 'Any special arguments for the bootstrap script?',
283283
'long_desc': ('What arguments to pass to the bootstrap script above? '
284284
'Override the defaults here. See http://bootstrap.saltstack.org '
285-
'for more info. You must include \'{salt_version}\' somewhere - '
285+
'for more info. You must include \'{{salt_version}}\' somewhere - '
286286
'it will be replaced by the current version of the salt master.'),
287-
'default': 'stable archive/{salt_version}'
287+
'default': 'stable {{salt_version}}'
288288
}, {
289289
'attr': 'db_dsn',
290290
'short_desc': ('What database DSN should stackdio use to connect to '

0 commit comments

Comments
 (0)