Skip to content

libnetwork support for docker on Solaris#1225

Merged
mavenugo merged 1 commit intomoby:masterfrom
puneetpruthi:solaris_integ
Oct 15, 2016
Merged

libnetwork support for docker on Solaris#1225
mavenugo merged 1 commit intomoby:masterfrom
puneetpruthi:solaris_integ

Conversation

@puneetpruthi
Copy link
Contributor

@puneetpruthi puneetpruthi commented Jun 8, 2016

This PR is targeting to add following libnetwork support for docker on Solaris:

  • Null network Driver
  • Bridge network Driver (w/ Port Mapping)
  • Unit tests for networks supported on Solaris

What this PR does not add support for:

  • docker network connect/disconnect operation(s)

The code changes for this PR are stable and open to review. The PR has been tested on Linux as well.

TODO:

Signed-off-by: Puneet Pruthi puneetpruthi@gmail.com

@puneetpruthi puneetpruthi force-pushed the solaris_integ branch 3 times, most recently from dcda412 to a290451 Compare June 8, 2016 04:06
@puneetpruthi puneetpruthi force-pushed the solaris_integ branch 2 times, most recently from f33120e to 24257e4 Compare June 8, 2016 06:48
@amitkris
Copy link
Contributor

amitkris commented Jun 8, 2016

@aboch: ping
This is a follow up to #1110. Could you take a look?

@puneetpruthi puneetpruthi force-pushed the solaris_integ branch 2 times, most recently from 98c7882 to c69fbda Compare June 24, 2016 21:32
@puneetpruthi puneetpruthi force-pushed the solaris_integ branch 11 times, most recently from fbf377b to b96065c Compare July 9, 2016 00:20
@puneetpruthi puneetpruthi force-pushed the solaris_integ branch 2 times, most recently from 3486790 to b96065c Compare July 9, 2016 13:01
@puneetpruthi puneetpruthi changed the title [WIP] libnetwork support for docker on Solaris libnetwork support for docker on Solaris Aug 1, 2016
@puneetpruthi
Copy link
Contributor Author

@aboch: Thanks for comments. Incorporated them and updated the branch.

func (d *driver) createNetwork(config *networkConfiguration) error {
var err error

fmt.Println("Creating bridge network:", config.ID,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can now replace the print calls with logrus ones.

@aboch
Copy link
Contributor

aboch commented Sep 14, 2016

A considerable amount of code is a duplicate from the current bridge driver implementation.
But at this stage, I think it is better this way, keep the two bridge drivers separated until the solaris one gets more testing. Minor comment and rest LGTM.

@puneetpruthi
Copy link
Contributor Author

@aboch .. thanks for the comments. Re-synced the branch and replaced fmt.Printlns with logrus. I agree about the code duplication and had the same train of thought going ahead.
Let me know in case any more changes are required.

@puneetpruthi puneetpruthi force-pushed the solaris_integ branch 3 times, most recently from 670b903 to 192d69c Compare September 30, 2016 16:36
@puneetpruthi
Copy link
Contributor Author

@aboch ... Can you please have a look if the PR needs anything else to merge ?

@aboch
Copy link
Contributor

aboch commented Sep 30, 2016

LGTM again

ping @mavenugo

@mavenugo
Copy link
Contributor

@puneetpruthi IT is failing :( .... can you please rebase to the latest libnetwork which has the updated fix for the CI issue.

@puneetpruthi
Copy link
Contributor Author

@mavenugo ... resynced and resolved the issues..

Copy link
Contributor

@mavenugo mavenugo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just 1 minor comment. LGTM otherwise.

return New(cfgOptions...)
}

func TestBoltdbBackend(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious to know why is this removed for solaris platform ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mavenugo ... libnetwork on Solaris does not support 'host' networking used by this test.

return nil
}

func (d *driver) RevokeExternalConnectivity(nid, eid string) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aboch can u pls take a closer look at this API not being handled ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did not notice the programExternalConenctivity() is implemented and the revoke is not.
@puneetpruthi I know this PR has been open for long time and you kept on improving it, has the above asymmetry always been there ? Can you call the counterpart removePFRule() in RevokeExternalConnectivity as long with the releasePorts().

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be an oversight on my part as we were not really using RevokeExternalConnectivity() to release the ports. Can add that. Thanks @aboch...
@mavenugo ... can I update the PR with this change ? Or should I wait for further comments ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @puneetpruthi . pls get this comment addressed and I dont have any more comments

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mavenugo .... added another commit with the changes.


// NewSandbox provides a new sandbox instance created in an os specific way
// provided a key which uniquely identifies the sandbox
func NewSandbox(key string, osCreate, isRestore bool) (Sandbox, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrjana could you pls chime in on the implications of not implementing the NewSandbox API ?
I know some other platforms also take this route. But am curious here because I dont have a way currently to verify this change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it's fine. Ideally we want every OS to implement this api but I understand that can be difficult to achieve in other OSes. But without being able to do this I am not sure how multiple networks can be attached to a container so that is an open question.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mrjana

@mavenugo
Copy link
Contributor

@puneetpruthi can u pls squash the changes ?

Signed-off-by: Puneet Pruthi <puneetpruthi@gmail.com>
@puneetpruthi
Copy link
Contributor Author

@mavenugo ... done.

@mavenugo mavenugo merged commit fad68bd into moby:master Oct 15, 2016
@puneetpruthi
Copy link
Contributor Author

Thanks @mavenugo !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants