Skip to content
This repository has been archived by the owner on Jan 19, 2018. It is now read-only.

Nested atomicapp applications error on the same namespace #398

Open
cdrage opened this issue Nov 13, 2015 · 5 comments
Open

Nested atomicapp applications error on the same namespace #398

cdrage opened this issue Nov 13, 2015 · 5 comments
Assignees

Comments

@cdrage
Copy link
Member

cdrage commented Nov 13, 2015

This semi-relates to issue #397

When using:

  • The Docker provider
  • A atomicapp container with inherited / nested atomicapp application
  • and.. all namespaces are default / not assigned

You encounter an error where you're unable to deploy the second inherited atomicapp application, ending up with a this namespace is already in use error.

This is due to the fact that you cannot assign a unique namespace to the inherited atomicapp container as well as the fact that our current regex expression if re.match("%s_+%s+_+[a-zA-Z0-9]{12}" % (self.default_name, self.namespace), container): within docker.py will match the first atomicapp container that was deployed.

@dharmit
Copy link
Contributor

dharmit commented Nov 24, 2015

I hit this issue on 0.2.1.

EDIT: I didn't really provide any info there.

I did atomicapp run <image-1> --provider=docker. Now if I do atomicapp run <image-2> --provider=docker, it complains that ProviderFailedException: Namespace with name default already deployed in Docker.

Let me know if I need to provide any more info.

@dustymabe
Copy link
Contributor

@cdrage I thought we talked about the implementation for this.. If we are deploying two instances of the same application:

  • instance of exampleapp (nulecule) - with namespace "default"
    • appa (nulecule)
      • image1
      • appaa (nulecule)
        • image2
    • appb (nulecule)
      • image3
      • image4
  • instance of exampleapp (nulecule) - with namespace "default1"
    • appa (nulecule)
      • image1
      • appaa (nulecule)
        • image2
    • appb (nulecule)
      • image3
      • image4

we would create image names:
default_appa_image1_$(RANDOM)
default_appa_appaa_image2_$(RANDOM)
default_appb_image3_$(RANDOM)
default_appb_image4_$(RANDOM)
default1_appa_image1_$(RANDOM)
default1_appa_appaa_image2_$(RANDOM)
default1_appb_image3_$(RANDOM)
default1_appb_image4_$(RANDOM)

or something along those lines

@cdrage
Copy link
Member Author

cdrage commented Nov 25, 2015

@dustymabe

Yes, you're right, we should do it along those lines (especially for the Docker provider).

I was a tad confused with projectatomic/nulecule#187 and @rtnpro proposal. But his one has to do more with namespacing in the answers.conf.

The docker provider should detect if it is an inherited application and act accordingly with naming the Docker containers.

@rtnpro
Copy link
Contributor

rtnpro commented Feb 4, 2016

@cdrage ping? we need to sync up on this.

@cdrage
Copy link
Member Author

cdrage commented Feb 5, 2016

@rtnpro this will be fixed before GA. are you good with @dustymabe 's proposal on the naming scheme?

@rtnpro rtnpro removed this from the CDK 2 GA milestone Feb 11, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants