openvcloud / 0-templates

Apache License 2.0
1 stars 5 forks source link

state.yaml file is empty after the services are deployed #48

Closed john-kheir closed 6 years ago

john-kheir commented 6 years ago

Scenario

1- Run a blueprint to create account and cloud space , should succeed

services:
  - github.com/openvcloud/0-templates/openvcloud/0.0.1__c33d2576:
      address: 'be-g8-3.demo.greenitglobe.com'
      login: 'kheirj@itsyouonline'
      token: '***'
      location: 'be-g8-3'

  - github.com/openvcloud/0-templates/vdcuser/0.0.1__kheirj:
      provider: itsyouonline
      openvcloud: c33d2576
      email: kheirj@greenitglobe.com

  - github.com/openvcloud/0-templates/account/0.0.1__e3b52e96:
      openvcloud: c33d2576

  - github.com/openvcloud/0-templates/vdc/0.0.1__512c0a5a:
      location: be-g8-3
      account: e3b52e96

actions:
  - template: github.com/openvcloud/0-templates/vdc/0.0.1
    actions: ['install']
  - template: github.com/openvcloud/0-templates/vdcuser/0.0.1
    actions: ['install']
  - template: github.com/openvcloud/0-templates/account/0.0.1
    actions: ['install']

Actual Result

root@0-robot2:/opt/code/github/john-kheir/0-robot6/zrobot_data/github.com/openvcloud/0-templates/vdc/512c0a5a/64e948ff-5e21-4b9a-b807-6895cae5c55d# cat state.yaml 
{}
root@0-robot2:/opt/code/github/john-kheir/0-robot6/zrobot_data/github.com/openvcloud/0-templates/vdc/512c0a5a/64e948ff-5e21-4b9a-b807-6895cae5c55d# cd ../../../account/e3b52e96/48f7cbd1-5b36-450c-97c0-378f78eb4625/
root@0-robot2:/opt/code/github/john-kheir/0-robot6/zrobot_data/github.com/openvcloud/0-templates/account/e3b52e96/48f7cbd1-5b36-450c-97c0-378f78eb4625# cat state.yaml 
{}
chrisvdg commented 6 years ago

Could not replicate this, I get:

cat /opt/code/github/chrisvdg/zrobot-data/zrobot_data/github.com/openvcloud/0-templates/account/chris_acc/b56a0749-1cd0-4c0c-8858-7d3a995a0cc4/state.yaml 
actions:
    install: ok

cat /opt/code/github/chrisvdg/zrobot-data/zrobot_data/github.com/openvcloud/0-templates/vdc/outer_space/caf9892e-ad42-4442-917f-5c6275064f9e/state.yaml 
actions:
    install: ok

blueprint:

services:
  - github.com/openvcloud/0-templates/openvcloud/0.0.1__d49e839b:
      address: 'be-g8-3.demo.greenitglobe.com'
      login: 'chris_van de gejuchte_1@itsyouonline'
      token: '***'
      location: 'be-g8-3'

  - github.com/openvcloud/0-templates/vdcuser/0.0.1__chris_van_de_gejuchte_1:
      provider: itsyouonline
      email: chris.vandegejuchte@gig.tech
      openvcloud: d49e839b

  - github.com/openvcloud/0-templates/account/0.0.1__chris_acc:
      openvcloud: d49e839b
      users: 
        - name: chris_van de gejuchte_1
          accesstype: ARCXDU

  - github.com/openvcloud/0-templates/vdc/0.0.1__outer_space:
      location: be-g8-3
      account: chris_acc

actions:
  - template: github.com/openvcloud/0-templates/account/0.0.1
    actions: ['install']
  - template: github.com/openvcloud/0-templates/vdcuser/0.0.1
    actions: ['install']
  - template: github.com/openvcloud/0-templates/vdc/0.0.1
    actions: ['install']

@john-kheir, can you try again with up to date code?

zaibon commented 6 years ago

@john-kheir the state and data of a service are only dump on the filesystem at a periodic interval. So could be you looked before the dump happens. You should not take the filesystem as source of truce. Only reposnse from the API as assured to always have last state.

john-kheir commented 6 years ago

@zaibon ye it seems that's what happens