Hi Nagu,
Here's a patch that fixes your issue in test #1.
For the other code review issues, is it OK if I just add them when
I push the final patch. Or do you want to review them now?
Alex
On 08/30/2018 01:44 AM, [1][email protected] wrote:
__________________________________________________________________
NOTICE: This email was received from an EXTERNAL sender
__________________________________________________________________
Hi Alex,
Thanks for your response.
For Test #2, I had configured all SUs on the single node SC-1. So, 2
container SUs and 2 contained SUs are on the same node. In such cases,
we can have the implementation as having only one SU of that
node(higher rank SUs may be) to be the container for all the contained
SUs of that node.
Thanks,
Nagendra, 91-9866424860
High Availability Solutions Pvt. Ltd. ([2]www.hasolutions.in)
- OpenSAF Support and Services
--------- Original Message ---------
Subject: Re: [PATCH 1/1] amf: add support for container/contained [#70]
From: "Alex Jones" [3]<[email protected]>
Date: 8/29/18 9:29 pm
To: [4][email protected], "Gary Lee"
[5]<[email protected]>, [6][email protected],
[7][email protected]
Cc: [8][email protected]
Hi Nagu,
I have a fix for your issue test #1. I will send out a patch along
with changes for code review #1 and #2.
For issue test #2, I think this needs to be handled in the
configuration. In this case because there is no explicit node set for
the contained SUs, su.cc:map_su_to_node will assign a node in the node
group. The code is assigning it to SC-2 in this case, because another
SU has been assigned to SC-1, even though there is no container on
SC-2. I'm not sure how we can get around this without explicitly
setting the contained host node in the configuration. Since the
container csi has not yet been assigned, we can't map it to a
container, and so we can't figure out which container we should be on
the same node as. Am I right here?
Alex
On 08/28/2018 09:56 AM, [9][email protected] wrote:
_______________________________________________________________
NOTICE: This email was received from an EXTERNAL sender
_______________________________________________________________
Hi Alex,
Code review:
1. Header for few functions are missing.
2. Clc.cc: Need to add '0' in place avnd_comp_clc_inst_try_again_hdler
in other fsm states.
Testing:
1. Uploaded AppConfig-container.xml and AppConfig-contained-2N.xml
Performed:
amf-adm unlock-in safSu=SU1,safSg=Container,safApp=Container
amf-adm unlock safSu=SU1,safSg=Container,safApp=Container
Even I don't perform the following, the contained components are
instantiated.
amf-adm unlock-in safSu=SU1,safSg=Contained_2N,safApp=Contained_2N
amf-adm unlock safSu=SU1,safSg=Contained_2N,safApp=Contained_2N
Aug 28 19:15:11 nags-VirtualBox osafamfnd[28278]: NO
'safSu=SU1,safSg=Contained_2N,safApp=Contained_2N' Presence State
UNINSTANTIATED => INSTANTIATING
immlist safSu=SU1,safSg=Contained_2N,safApp=Contained_2N will show
saAmfSUPresenceState 3(instantiated) and saAmfSUAdminState 3(locked-in)
Now further admin operation on
safSu=SU1,safSg=Contained_2N,safApp=Contained_2N will fail:
root@nags-VirtualBox:/home/nags/views/ajones-review/samples/amf/contain
er# amf-adm unlock-in safSu=SU1,safSg=Contained_2N,safApp=Contained_2N
error - saImmOmAdminOperationInvoke_2 admin-op RETURNED:
SA_AIS_ERR_BAD_OPERATION (20)
error-string: Can't instantiate
'safSu=SU1,safSg=Contained_2N,safApp=Contained_2N', whose presence
state is '3'
2.This is related to Specs 6.2.2 Assignment of the Container CSI: "If
there are multiple container components on a node which have the active
HA state
for a particular container CSI, and one or more service units on the
same node whose
contained components are configured with the same container CSI, it is
implementation-
defined how the Availability Management Framework selects container
components
to handle the life cycle of the contained components of these service
units.
However, all contained components of a service unit must have the same
associated
container component."
Uploaded AppConfig-container.xml and AppConfig-contained-2N.xml with
once difference that all SUs of container and contained are configured
on SC-1.
Perform the following operations, but
safSu=SU2,safSg=Contained_2N,safApp=Contained_2N will not get
assignments.
amf-adm unlock-in safSu=SU1,safSg=Contained_2N,safApp=Contained_2N
amf-adm unlock safSu=SU1,safSg=Contained_2N,safApp=Contained_2N
amf-adm unlock-in safSu=SU2,safSg=Contained_2N,safApp=Contained_2N
amf-adm unlock safSu=SU2,safSg=Contained_2N,safApp=Contained_2N
amf-adm unlock-in safSu=SU1,safSg=Container,safApp=Container
amf-adm unlock safSu=SU1,safSg=Container,safApp=Container
amf-adm unlock-in safSu=SU2,safSg=Container,safApp=Container
amf-adm unlock safSu=SU2,safSg=Container,safApp=Container
root@nags-VirtualBox:/home/nags/views/ajones-review/samples/amf/contain
er# amf-state siass
safSISU=safSu=SC-1\,safSg=NoRed\,safApp=OpenSAF,safSi=NoRed1,safApp=Ope
nSAF
saAmfSISUHAState=ACTIVE(1)
saAmfSISUHAReadinessState=READY_FOR_ASSIGNMENT(1)
safSISU=safSu=SC-1\,safSg=2N\,safApp=OpenSAF,safSi=SC-2N,safApp=OpenSAF
saAmfSISUHAState=ACTIVE(1)
saAmfSISUHAReadinessState=READY_FOR_ASSIGNMENT(1)
safSISU=safSu=SU1\,safSg=Contained_2N\,safApp=Contained_2N,safSi=Contai
ned_2N_1,safApp=Contained_2N
saAmfSISUHAState=ACTIVE(1)
saAmfSISUHAReadinessState=READY_FOR_ASSIGNMENT(1)
safSISU=safSu=SU1\,safSg=Container\,safApp=Container,safSi=Container,sa
fApp=Container
saAmfSISUHAState=ACTIVE(1)
saAmfSISUHAReadinessState=READY_FOR_ASSIGNMENT(1)
safSISU=safSu=SU2\,safSg=Container\,safApp=Container,safSi=Container,sa
fApp=Container
saAmfSISUHAState=ACTIVE(1)
saAmfSISUHAReadinessState=READY_FOR_ASSIGNMENT(1)
I will do further testing.
The documentation need to be done if you haven't tested :
- Headless enabled
- CSI Dep, SI Dep testimg
- Etc.
Thanks,
Nagendra, 91-9866424860
High Availability Solutions Pvt. Ltd. ([10]www.hasolutions.in)
- OpenSAF Support and Services
--------- Original Message ---------
Subject: Re: [PATCH 1/1] amf: add support for container/contained [#70]
From: "Alex Jones" [11]<[email protected]>
Date: 8/15/18 11:10 pm
To: "Gary Lee" [12]<[email protected]>,
[13][email protected], [14][email protected],
[15][email protected]
Cc: [16][email protected]
G'day Gary,
I see you were adding the XML file dynamically with "immcfg -f". I
hadn't tried that. I hadn't tried killing the sample app, either.
Here is a patch that should fix both issues. Apply it on top of the
latest big one I sent.
Alex
On 08/13/2018 10:37 PM, Gary Lee wrote:
_______________________________________________________________
NOTICE: This email was received from an EXTERNAL sender
_______________________________________________________________
Hi Alex
I modified AppConfig-container.xml and changed
saAmfSgtRedundancyModel from 4 (NwayAct) to 1 (2N).
The xml still loads and I could unlock, resulting in:
root@SC-1:/var/log# immlist safVersion=1,safSgType=Container
Name Type
Value(s)
====================================================================
====
safVersion SA_STRING_T
safVersion=1
saAmfSgtValidSuTypes SA_NAME_T
safVersion=1,safSuType=Container (32)
saAmfSgtRedundancyModel SA_UINT32_T 1
(0x1)
safSISU=safSu=SU2\,safSg=Container\,safApp=Container,safSi=Container
,safApp=Container
saAmfSISUHAState=STANDBY(2)
saAmfSISUHAReadinessState=READY_FOR_ASSIGNMENT(1)
safSISU=safSu=SU1\,safSg=Container\,safApp=Container,safSi=Container
,safApp=Container
saAmfSISUHAState=ACTIVE(1)
saAmfSISUHAReadinessState=READY_FOR_ASSIGNMENT(1)
Also, have you tried killing the amf_container_demo binary?
Thanks
Gary
On 14/08/18 05:00, Alex Jones wrote:
Hi Gary,
I just resubmitted a new patch which breaks out the different
components, and addresses the other comments here. But, #2
(rejecting all but NWay-active for container) should already be in
there. Is there a specific test you ran that didn't work?
Alex
On 08/13/2018 02:43 AM, Gary Lee wrote:
_______________________________________________________________
NOTICE: This email was received from an EXTERNAL sender
_______________________________________________________________
Hi Alex
Some initial comments:
0. Is it possible to split up the patch into amfd / amfnd / common /
samples. Just makes it easier to reply inline.
1. Please compile the container demo by default, and make
amf_container_script world executable.
Eg.
diff --git a/samples/amf/Makefile.am b/samples/amf/Makefile.am
index 447dedd..7ebf9c3 100644
--- a/samples/amf/Makefile.am
+++ b/samples/amf/Makefile.am
@@ -19,5 +19,5 @@ include $(top_srcdir)/Makefile.common
MAINTAINERCLEANFILES = Makefile.in
-SUBDIRS = sa_aware non_sa_aware wrapper proxy api_demo
+SUBDIRS = sa_aware non_sa_aware wrapper proxy api_demo container
diff --git a/samples/amf/container/amf_container_script
b/samples/amf/container/amf_container_script
old mode 100644
new mode 100755
diff --git a/samples/configure.ac b/samples/configure.ac
index 7cf803e..9765d54 100644
--- a/samples/configure.ac
+++ b/samples/configure.ac
@@ -67,6 +67,7 @@ AC_CONFIG_FILES([ \
amf/wrapper/Makefile \
amf/proxy/Makefile \
amf/api_demo/Makefile \
+ amf/container/Makefile \
cpsv/Makefile \
cpsv/ckpt_demo/Makefile \
cpsv/ckpt_track_demo/Makefile \
2. We should probably reject CCBs that set saAmfSgtRedundancyModel
to anything other than NWayActive, for Containers.
3. Do we need to bump the msg format version to
AVSV_AVD_AVND_MSG_FMT_VER_8? An old amfnd will assert if it gets an
AVSV_D2N_CONTAINED_SU_MSG_INFO msg.
Thanks
Gary
References
1. mailto:[email protected]
2.
https://protect-us.mimecast.com/s/-T94Co2O52iMwlVT1yQnR?domain=hasolutions.in
3. mailto:[email protected]
4. mailto:[email protected]
5. mailto:[email protected]
6. mailto:[email protected]
7. mailto:[email protected]
8. mailto:[email protected]
9. mailto:[email protected]
10.
https://protect-us.mimecast.com/s/sJabCpYz3YiGwQ0uDNiKx?domain=hasolutions.in
11. mailto:[email protected]
12. mailto:[email protected]
13. mailto:[email protected]
14. mailto:[email protected]
15. mailto:[email protected]
16. mailto:[email protected]
commit bf998b543d44f5bd2f8dc266ecf373765cfd6b76 Author: Alex Jones <[email protected]> Date: Thu Sep 6 11:18:59 2018 -0400 amfd: don't start contained if it is in locked-in state [#70] diff --git a/src/amf/amfd/node.cc b/src/amf/amfd/node.cc index f6016c826..d19cee603 100644 --- a/src/amf/amfd/node.cc +++ b/src/amf/amfd/node.cc @@ -1693,6 +1693,7 @@ void AVD_AVND::instantiate_contained_sus(AVD_SU *container_su, (su->su_on_node->node_state == AVD_AVND_STATE_NCS_INIT)) && ((su->su_on_node->saAmfNodeAdminState != SA_AMF_ADMIN_LOCKED_INSTANTIATION) && (su->sg_of_su->saAmfSGAdminState != SA_AMF_ADMIN_LOCKED_INSTANTIATION)) && + (su->saAmfSUAdminState != SA_AMF_ADMIN_LOCKED_INSTANTIATION) && (su->sg_of_su->saAmfSGNumPrefInserviceSUs > sg_instantiated_su_count(su->sg_of_su))) { if (avd_instantiate_contained_su(avd_cb, container_su, su, false) == NCSCC_RC_SUCCESS) {
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________ Opensaf-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensaf-devel
