Bug 1947246 - [RFE] oraasm: The oraasm resource agent should manage the specified Oracle ASM diskgroup (RHEL 8)
Summary: [RFE] oraasm: The oraasm resource agent should manage the specified Oracle AS...
Keywords:
Status: ASSIGNED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: resource-agents
Version: 8.3
Hardware: All
OS: Linux
medium
medium
Target Milestone: beta
: ---
Assignee: Oyvind Albrigtsen
QA Contact: cluster-qe
URL:
Whiteboard:
Depends On:
Blocks: 2088962
TreeView+ depends on / blocked
 
Reported: 2021-04-08 04:39 UTC by Reid Wahl
Modified: 2023-08-10 15:41 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
: 2088962 (view as bug list)
Environment:
Last Closed:
Type: Feature Request
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1786812 1 medium CLOSED oraasm: false positive monitoring op result [RHEL 8] 2021-06-28 07:33:10 UTC
Red Hat Knowledge Base (Solution) 4027631 0 None None None 2021-04-08 04:39:11 UTC
Red Hat Knowledge Base (Solution) 5948731 0 None None None 2021-04-08 14:24:06 UTC

Description Reid Wahl 2021-04-08 04:39:12 UTC
Description of problem:

The oraasm resource agent accepts a diskgroup as a required parameter, but it does nothing to manage that diskgroup directly. It simply starts, stops, and monitors Oracle Clusterware High Availability Services (HAS) (via the ohasd service).

This is problematic for a couple of reasons:
  - It can return a false positive monitoring result when HAS is active but ASM is inactive or the specified diskgroup is not mounted. (See also BZ1786812.)
  - It does not allow the creation of multiple individual oraasm resource agents to manage multiple individual diskgroups. If a user creates two oraasm resource agents, then both of them will simply manage the ohasd service as a whole. This is much less useful than being able to manage one diskgroup per resource. It's also counter-intuitive, as the average user expects the resource to manage the diskgroup that it's configured to manage.

We should overhaul this resource agent, potentially creating a revised "oraasm2" to reflect the significant changes in behavior.

At a high level, what it ought to do appears to be pretty straightforward:
  - Start: Mount the specified diskgroup[1].
  - Stop: Unmount ("dismount" in Oracle's terminology) the specified diskgroup[1].
  - Monitor: If Oracle cluster services are running, check the status of the specified diskgroup (using the `asmcmd lsdg` command[2]).

IMO, the oraasm resource agent should never start or stop the ohasd (Oracle High Availability Services Daemon) service at all. Currently, **all** it does is start, stop, and monitor the ohasd service. It doesn't do anything specific to the diskgroup that it claims to manage. (A user could create a separate LSB-class resource to manage the ohasd service.)

Additionally, `diskgroup` is listed in the RA metadata as a required option. However, it's either ignored or practically ignored:
  - If `home` is set, then `diskgroup` is ignored entirely.
  - If `home` is not set, then `diskgroup` is used to look up a home directory from `/etc/oratab`. Then it's ignored after that.

The monitor operation (checking the status of a diskgroup) can be done with `asmcmd lsdg`. Mounting and unmounting have to be done via SQL commands. That's more complicated, but I hope we'd be able to re-use a lot of the logic from the oracle resource agent.

[1] https://docs.oracle.com/database/121/OSTMG/GUID-4782D609-766B-4686-B5E4-90A8EFC10DEA.htm#OSTMG94155
[2] https://docs.oracle.com/cd/B28359_01/server.111/b31107/asm_util.htm#OSTMG94273

-----

Version-Release number of selected component (if applicable):

resource-agents-4.1.1-68.el8


Note You need to log in before you can comment on or make changes to this bug.