Commit 05bfbb9d authored by Kirill Smelkov's avatar Kirill Smelkov

Revert "hello-world: add IP examples"

This reverts the essence of commit 854e4766:

Changing there

    ${instance-parameter:ipv6-random}

to

    ${instance-parameter:global-ipv6}

was wrong - slapos.cookbook:slapconfiguration recipe, which is leveraged
by [instance-parameter] section does not define global-ipv6:

    http://git.erp5.org/gitweb/slapos.git/blob/HEAD:/slapos/recipe/slapconfiguration.py?js=1#l70

- only ipv6 as "Set of IPv6 addresses (of partition)" and ipv6-random
"One of the IPv6 addresses".

Trying to instantiate a helloworld SR inside webrunner:

    ---- 8< ---- (instance.log)
    ...
    [2015-04-26 11:56:20,133] INFO Error: Referenced option does not exist: instance-parameter global-ipv6
    ...

and the same error while instantiating helloworld SR without slaprunner
under local slapproxy.

~~~~

The global-ipv6 is helpfully injected by slapos.cookbook:softwaretype
recipe into [slap-network-information] section:

    http://git.erp5.org/gitweb/slapos.git/blob/HEAD:/slapos/recipe/softwaretype.py?js=1#l164

but unfortunately only if that slapos.cookbook:softwaretype recipe is
activated - i.e. when we have several software types and we support switching
between them, which is not the case for helloworld (and it's a pity that
such fundamental network-configuration is only optionally provided by SlapOS).

~~~~

So let's switch back to ${instance-parameter:ipv6-random} - this way
helloworld instance can be instantiated again.

Cc: Jérome Perrin <jerome@nexedi.com>
parent 9a869b2e
...@@ -65,7 +65,7 @@ log = $${:var}/log ...@@ -65,7 +65,7 @@ log = $${:var}/log
# This recipe will try to "exec" the command-line after separating parameters. # This recipe will try to "exec" the command-line after separating parameters.
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
# Notice that there is only one $ at ${dash:location}, it is because it comes from the Software Release buildout profile. # Notice that there is only one $ at ${dash:location}, it is because it comes from the Software Release buildout profile.
command-line = ${dash:location}/bin/dash -c 'echo "Hello $${instance-parameter:configuration.name}, it is $(date). If I were a server application, you would reach me at $${instance-parameter:global-ipv6}" > $${directory:log}/log.log; sleep 1000000;' command-line = ${dash:location}/bin/dash -c 'echo "Hello $${instance-parameter:configuration.name}, it is $(date). If I were a TCP server, I would be listening on [$${instance-parameter:ipv6-random}] or $${instance-parameter:ipv4-random}" > $${directory:log}/log.log; sleep 1000000;'
# Put this shell script in the "etc/service" directory. Each executable of this # Put this shell script in the "etc/service" directory. Each executable of this
# repository will be started and monitored by supervisord. If a service # repository will be started and monitored by supervisord. If a service
# exits/crashes, it will trigger a "bang" and cause a re-run of the instance. # exits/crashes, it will trigger a "bang" and cause a re-run of the instance.
......
...@@ -26,5 +26,5 @@ recipe = slapos.recipe.template ...@@ -26,5 +26,5 @@ recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/instance.cfg output = ${buildout:directory}/instance.cfg
# MD5 checksum can be skipped for development (easier to develop), but must be filled for production # MD5 checksum can be skipped for development (easier to develop), but must be filled for production
md5sum = 1fea8a474f3b2eb7847685659441a3f9 md5sum = 532d13c3aee4f0252181da39765317f0
mode = 0644 mode = 0644
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment