ansible-oracle-modules icon indicating copy to clipboard operation
ansible-oracle-modules copied to clipboard

Cannot create a tablespace without giving a size

Open tyskjohan opened this issue 5 years ago • 4 comments

"Blergh, something went wrong while executing - ORA-02237: invalid file size sql: create bigfile tablespace users datafile size None"

{
"_ansible_item_label": "ora_meta_ocitest0",
"_ansible_item_result": true,
"_ansible_no_log": false,
"_ansible_parsed": true,
"changed": false,
"failed": true,
"invocation": {
"module_args": {
"autoextend": false,
"bigfile": true,
"content": "permanent",
"datafile": null,
"hostname": "elhdb1-ocitest0-scan.ocitest0.elhubdevvcn.oraclevcn.com",
"maxsize": null,
"mode": "sysdba",
"nextsize": null,
"numfiles": null,
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"port": "1521",
"service_name": "ora_meta_ocitest0.ocitest0.elhubdevvcn.oraclevcn.com",
"size": null,
"state": "present",
"tablespace": "users",
"user": "sys"
}
},
"item": "ora_meta_ocitest0",
"msg": "Blergh, something went wrong while executing - ORA-02237: invalid file size sql: create bigfile tablespace users datafile size None"
},

The size_clause is not mandatory in tablespace creation, and the API should support referring to the default.

tyskjohan avatar May 15 '19 10:05 tyskjohan

I'll fix it

oravirt avatar May 15 '19 11:05 oravirt

Fixed now. It'll error if size is not defined

oravirt avatar May 15 '19 11:05 oravirt

But why should the Ansible module force a parameter that the database doesn't require?

tyskjohan avatar May 15 '19 19:05 tyskjohan

No it's not required, but it's a behaviour (in Oracle) that is just horrible. You're going through the trouble to apply state to a resource so why not do that in a way so you know what you get?

That being said, it's probably a pretty easy fix to mimic this behaviour but I'm reluctant to do so....

oravirt avatar May 16 '19 15:05 oravirt