crm_verbose("performing op %s...", operation);
crm_info("Performing %s on %s", operation, id_from_cib);
do_fake_lrm_op(gpointer data){	xmlNodePtr msg          = NULL;	const char *crm_op      = NULL;	const char *operation   = NULL;	const char *id_from_cib = NULL;	long int op_code = 0;	const char *op_status = NULL;	xmlNodePtr update = NULL;	xmlNodePtr state = NULL;	xmlNodePtr iter = NULL;	char *op_code_s = NULL;		if(data == NULL) {		return I_ERROR;	}		msg = (xmlNodePtr)data;		operation = get_xml_attr_nested(		msg, rsc_path, DIMOF(rsc_path) -3, XML_LRM_ATTR_TASK, TRUE);		id_from_cib = get_xml_attr_nested(		msg, rsc_path, DIMOF(rsc_path) -2, XML_ATTR_ID, TRUE);		crm_op = get_xml_attr(msg, XML_TAG_OPTIONS, XML_ATTR_OP, TRUE);	if(safe_str_eq(crm_op, "rsc_op")) {		state = create_xml_node(NULL, XML_CIB_TAG_STATE);		iter = create_xml_node(state, XML_CIB_TAG_LRM);		crm_verbose("performing op %s...", operation);		// so we can identify where to do the update		set_uuid(state, XML_ATTR_UUID, fsa_our_uname);		iter = create_xml_node(iter, XML_LRM_TAG_RESOURCES);		iter = create_xml_node(iter, "lrm_resource");		set_xml_property_copy(iter, XML_ATTR_ID, id_from_cib);		set_xml_property_copy(iter, XML_LRM_ATTR_LASTOP, operation);#if 0		/* introduce a 10% chance of an action failing */		op_code = random();#endif		if((op_code % 10) == 1) {			op_code = 1;		} else {			op_code = 0;		}		op_code_s = crm_itoa(op_code);		if(op_code) {			// fail			if(safe_str_eq(operation, "start")){				op_status = "stopped";			} else {				op_status = "started";			}		} else {			// pass			if(safe_str_eq(operation, "start")){				op_status = "started";			} else {				op_status = "stopped";			}		}				set_xml_property_copy(iter, XML_LRM_ATTR_RSCSTATE,op_status);		set_xml_property_copy(iter, XML_LRM_ATTR_OPCODE, op_code_s);		set_xml_property_copy(			iter, XML_LRM_ATTR_TARGET, fsa_our_uname);		crm_free(op_code_s);				update = create_cib_fragment(state, NULL);				send_request(NULL, update, CRM_OP_UPDATE,			     fsa_our_dc, CRM_SYSTEM_DCIB, NULL);	}		return I_NULL;}