Fwd: [tc][ansible][ironic] Reusing Ansible code in OpenStack projects
Hi all, I have a question re FOSS licenses interplay. I am pretty sure that OpenStack community (e.g. openstack-ansible) has already faced such questions and I would really appreciate any advice. We are developing a new ansible-based deployment driver for Ironic [0] and would like to use some parts of ansible-lib Python API to avoid boilerplate code in custom Ansible modules and callbacks we are writing, and in the future probably use Ansible Python API to launch playbooks themselves. The problem is Ansible and ansible-lib in particular are licensed under GPL v3 [1] "or later" [2]. According to [3] Apache 2.0 license is only one way compatible with GPL v3 (GPL v3-licensed code can include Apache 2.0-licensed code, but not vice versa). I am by far not a legal expert, so my questions are: Does it mean that the moment I do "from ansible import ..." in my Python code, which AFAIU means I am "linking" to it, I am required to use a GPLv3-compliant license for my code too (in particular not Apache 2.0)? What problems might that imply in respect with including such code in an OpenStack project (e.g. submitting it to Ironic repo) and distributing the project? If there are indeed problems with that, would it be safer to keep the code in a separate project and also distribute it separately? Even when distributed separately, will merely using (dynamically importing at run-time) a GPLv3-licensed driver from ApacheV2-licensed Ironic constitute any license violation? Note that technically we could avoid re-using Ansible code for Ansible modules and callbacks, just that it would be much-much less convenient. [0] https://review.openstack.org/#/q/topic:bug/1526308 [1] https://github.com/ansible/ansible/blob/devel/COPYING [2] https://github.com/ansible/ansible/blob/devel/lib/ansible/__init__.py#L8 [3] http://www.apache.org/licenses/GPL-compatibility.html Best regards, Dr. Pavlo Shchelokovskyy Senior Software Engineer Mirantis Inc www.mirantis.com
On Thu, May 19, 2016 at 03:58:11PM +0300, Pavlo Shchelokovskyy wrote:
We are developing a new ansible-based deployment driver for Ironic [0] and would like to use some parts of ansible-lib Python API to avoid boilerplate code in custom Ansible modules and callbacks we are writing, and in the future probably use Ansible Python API to launch playbooks themselves.
The problem is Ansible and ansible-lib in particular are licensed under GPL v3 [1] "or later" [2]. According to [3] Apache 2.0 license is only one way compatible with GPL v3 (GPL v3-licensed code can include Apache 2.0-licensed code, but not vice versa).
I am by far not a legal expert, so my questions are:
Does it mean that the moment I do "from ansible import ..." in my Python code, which AFAIU means I am "linking" to it, I am required to use a GPLv3-compliant license for my code too (in particular not Apache 2.0)? What problems might that imply in respect with including such code in an OpenStack project (e.g. submitting it to Ironic repo) and distributing the project? If there are indeed problems with that, would it be safer to keep the code in a separate project and also distribute it separately? Even when distributed separately, will merely using (dynamically importing at run-time) a GPLv3-licensed driver from ApacheV2-licensed Ironic constitute any license violation?
Without addressing the actual substance of your legal questions, are they addressed for purposes of OpenStack policy by https://wiki.openstack.org/wiki/LegalIssuesFAQ#Licensing_of_library_dependen... and http://governance.openstack.org/reference/licensing.html ? Richard
From: Pavlo Shchelokovskyy <pshchelokovskyy@mirantis.com<mailto:pshchelokovskyy@mirantis.com>> Date: Thursday, May 19, 2016 at 5:58 AM To: "legal-discuss@lists.openstack.org<mailto:legal-discuss@lists.openstack.org>" <legal-discuss@lists.openstack.org<mailto:legal-discuss@lists.openstack.org>> Subject: [legal-discuss] Fwd: [tc][ansible][ironic] Reusing Ansible code in OpenStack projects Hi all, I have a question re FOSS licenses interplay. I am pretty sure that OpenStack community (e.g. openstack-ansible) has already faced such questions and I would really appreciate any advice. We are developing a new ansible-based deployment driver for Ironic [0] and would like to use some parts of ansible-lib Python API to avoid boilerplate code in custom Ansible modules and callbacks we are writing, and in the future probably use Ansible Python API to launch playbooks themselves. The problem is Ansible and ansible-lib in particular are licensed under GPL v3 [1] "or later" [2]. According to [3] Apache 2.0 license is only one way compatible with GPL v3 (GPL v3-licensed code can include Apache 2.0-licensed code, but not vice versa). I am by far not a legal expert, so my questions are: Does it mean that the moment I do "from ansible import ..." in my Python code, which AFAIU means I am "linking" to it, I am required to use a GPLv3-compliant license for my code too (in particular not Apache 2.0)? IANAL but yes that is what it means. I'd propose running ansible in a subprocess which treats it as a network service since it runs over a network (pipe) in a separate process address spce. From my limited understanding this does not cause license contamination. What problems might that imply in respect with including such code in an OpenStack project (e.g. submitting it to Ironic repo) and distributing the project? If there are indeed problems with that, would it be safer to keep the code in a separate project and also distribute it separately? Even when distributed separately, will merely using (dynamically importing at run-time) a GPLv3-licensed driver from ApacheV2-licensed Ironic constitute any license violation? Note that technically we could avoid re-using Ansible code for Ansible modules and callbacks, just that it would be much-much less convenient. [0] https://review.openstack.org/#/q/topic:bug/1526308 [1] https://github.com/ansible/ansible/blob/devel/COPYING [2] https://github.com/ansible/ansible/blob/devel/lib/ansible/__init__.py#L8 [3] http://www.apache.org/licenses/GPL-compatibility.html Best regards, Dr. Pavlo Shchelokovskyy Senior Software Engineer Mirantis Inc www.mirantis.com<http://www.mirantis.com>
On 05/19/2016 12:15 PM, Steven Dake (stdake) wrote:
From: Pavlo Shchelokovskyy <pshchelokovskyy@mirantis.com <mailto:pshchelokovskyy@mirantis.com>> Date: Thursday, May 19, 2016 at 5:58 AM To: "legal-discuss@lists.openstack.org <mailto:legal-discuss@lists.openstack.org>" <legal-discuss@lists.openstack.org <mailto:legal-discuss@lists.openstack.org>> Subject: [legal-discuss] Fwd: [tc][ansible][ironic] Reusing Ansible code in OpenStack projects
Hi all,
I have a question re FOSS licenses interplay. I am pretty sure that OpenStack community (e.g. openstack-ansible) has already faced such questions and I would really appreciate any advice.
We are developing a new ansible-based deployment driver for Ironic [0] and would like to use some parts of ansible-lib Python API to avoid boilerplate code in custom Ansible modules and callbacks we are writing, and in the future probably use Ansible Python API to launch playbooks themselves.
SO - before we get caught up in the legal parts of this. We started down the path of using the ansible python API in zuul v3 and it turns out it's not actually particularly pleasant for things like "please run this playbook". We have moved forward with having zuul v3 use subprocess.Popen to call the ansible-playbook command having written some content to a temp directory and the results are rather pleasing. I chatted with Jim about splitting the "please run this ansible playbook with these variables and this config" into a library. If you've got a similar usecase elsehwere, maybe making that library is worth discussing in earnest.
The problem is Ansible and ansible-lib in particular are licensed under GPL v3 [1] "or later" [2]. According to [3] Apache 2.0 license is only one way compatible with GPL v3 (GPL v3-licensed code can include Apache 2.0-licensed code, but not vice versa).
I am by far not a legal expert, so my questions are:
Does it mean that the moment I do "from ansible import ..." in my Python code, which AFAIU means I am "linking" to it, I am required to use a GPLv3-compliant license for my code too (in particular not Apache 2.0)?
IANAL but yes that is what it means.
It turns out that there are conflicting opinions on this. There are people who agree with that, and people who are of the opinion that it does not constitute linking. I have heard each opinion from lawyers. As it has never been tested in court, it turns out ALL answers on the subject are at best educated guesses.
I'd propose running ansible in a subprocess which treats it as a network service since it runs over a network (pipe) in a separate process address spce. From my limited understanding this does not cause license contamination.
Yes. Also, I think you'll find that we can collaborate on the mechanics of this pretty nicely.
What problems might that imply in respect with including such code in an OpenStack project (e.g. submitting it to Ironic repo) and distributing the project? If there are indeed problems with that, would it be safer to keep the code in a separate project and also distribute it separately? Even when distributed separately, will merely using (dynamically importing at run-time) a GPLv3-licensed driver from ApacheV2-licensed Ironic constitute any license violation?
There should be no need to avoid ansible code in your modules. There is an explicit license carve out in ansible for module authors. Can you provide an example of code you want to use but are concerned about?
Note that technically we could avoid re-using Ansible code for Ansible modules and callbacks, just that it would be much-much less convenient.
[0] https://review.openstack.org/#/q/topic:bug/1526308 [1] https://github.com/ansible/ansible/blob/devel/COPYING [2] https://github.com/ansible/ansible/blob/devel/lib/ansible/__init__.py#L8 [3] http://www.apache.org/licenses/GPL-compatibility.html
Best regards,
Dr. Pavlo Shchelokovskyy Senior Software Engineer Mirantis Inc www.mirantis.com <http://www.mirantis.com>
_______________________________________________ legal-discuss mailing list legal-discuss@lists.openstack.org http://lists.openstack.org/cgi-bin/mailman/listinfo/legal-discuss
participants (4)
-
Monty Taylor
-
Pavlo Shchelokovskyy
-
Richard Fontana
-
Steven Dake (stdake)