Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Can I delete an Ambari configuration version?

avatar

Hi,

Few questions on Ambari:

1) Can we delete a service configuration version in Ambari?

--Say i made a horrible mistake in my configuration and saved it, reverted back, but i don't want any one in my admin team to go back and apply that version some time later. to avoid that i need to remove it from config history.

2) How many versions of configs will Ambari save in history?

-- can that be configured?

3) Does Ambari have any views/method to alert for Job/application Failures?

Thanks,

1 ACCEPTED SOLUTION

avatar
Master Guru

@Jobin George

Good question! 🙂

Please find answers below:

Note - Please take backup of your ambari database before proceeding with suggested steps

.

1) Can we delete a service configuration version in Ambari?

Below are the tables responsible for holding service configuration version information

widget_layout
clusterconfigmapping
widget_layout_user_widget
serviceconfigmapping
serviceconfig

Suppose I have modified my hdfs configuration by 'kuldeep' user and I want to remove it completely from ambari UI.

Please execute below queries in ambari DB

ambari=> select * from serviceconfig where user_name like '%kuldeep%';
 service_config_id | cluster_id | service_name | version | create_timestamp | stack_id | user_name | group_id |  note
-------------------+------------+--------------+---------+------------------+----------+-----------+----------+---------
               407 |          2 | HDFS         |      15 |    1466844482492 |        1 | kuldeep   |          | kuldeep
(1 row)
ambari=> delete from serviceconfigmapping where service_config_id=407;
DELETE 11
ambari=> delete from serviceconfig where user_name like '%kuldeep%';
DELETE 1
ambari=> select * from clusterconfigmapping where user_name like '%kuldeep%';
 cluster_id | type_name  |     version_tag      | create_timestamp | selected | user_name
------------+------------+----------------------+------------------+----------+-----------
          2 | hadoop-env | version1466844481864 |    1466844482490 |        1 | kuldeep
(1 row)
ambari=> delete from clusterconfigmapping where user_name like '%kuldeep%';
DELETE 1
ambari=> select * from widget_layout where layout_name like '%kuldeep%';
 id  |      layout_name       | section_name | scope | user_name |      display_name       | cluster_id
-----+------------------------+--------------+-------+-----------+-------------------------+------------
 152 | kuldeep_hdfs_dashboard | HDFS_SUMMARY | USER  | kuldeep   | Standard HDFS Dashboard |          2
(1 row)
ambari=> delete from widget_layout_user_widget where widget_layout_id='152';
DELETE 10
ambari=> delete from widget_layout where layout_name like '%kuldeep%';
DELETE 1

.

2) How many versions of configs will Ambari save in history?

I don't think there is any limit, as this version information gets stored in the Ambari DB.

.

3) Does Ambari have any views/method to alert for Job/application Failures?

No. We don't have any views for YARN Job browser except for TEZ applications.

Hope this information helps.

View solution in original post

3 REPLIES 3

avatar
Master Guru

@Jobin George

Good question! 🙂

Please find answers below:

Note - Please take backup of your ambari database before proceeding with suggested steps

.

1) Can we delete a service configuration version in Ambari?

Below are the tables responsible for holding service configuration version information

widget_layout
clusterconfigmapping
widget_layout_user_widget
serviceconfigmapping
serviceconfig

Suppose I have modified my hdfs configuration by 'kuldeep' user and I want to remove it completely from ambari UI.

Please execute below queries in ambari DB

ambari=> select * from serviceconfig where user_name like '%kuldeep%';
 service_config_id | cluster_id | service_name | version | create_timestamp | stack_id | user_name | group_id |  note
-------------------+------------+--------------+---------+------------------+----------+-----------+----------+---------
               407 |          2 | HDFS         |      15 |    1466844482492 |        1 | kuldeep   |          | kuldeep
(1 row)
ambari=> delete from serviceconfigmapping where service_config_id=407;
DELETE 11
ambari=> delete from serviceconfig where user_name like '%kuldeep%';
DELETE 1
ambari=> select * from clusterconfigmapping where user_name like '%kuldeep%';
 cluster_id | type_name  |     version_tag      | create_timestamp | selected | user_name
------------+------------+----------------------+------------------+----------+-----------
          2 | hadoop-env | version1466844481864 |    1466844482490 |        1 | kuldeep
(1 row)
ambari=> delete from clusterconfigmapping where user_name like '%kuldeep%';
DELETE 1
ambari=> select * from widget_layout where layout_name like '%kuldeep%';
 id  |      layout_name       | section_name | scope | user_name |      display_name       | cluster_id
-----+------------------------+--------------+-------+-----------+-------------------------+------------
 152 | kuldeep_hdfs_dashboard | HDFS_SUMMARY | USER  | kuldeep   | Standard HDFS Dashboard |          2
(1 row)
ambari=> delete from widget_layout_user_widget where widget_layout_id='152';
DELETE 10
ambari=> delete from widget_layout where layout_name like '%kuldeep%';
DELETE 1

.

2) How many versions of configs will Ambari save in history?

I don't think there is any limit, as this version information gets stored in the Ambari DB.

.

3) Does Ambari have any views/method to alert for Job/application Failures?

No. We don't have any views for YARN Job browser except for TEZ applications.

Hope this information helps.

avatar

@Kuldeep Kulkarni, Thanks. This is good info, just to confirm:

- you mentioned clusterconfigmapping twice, I assume "serviceconfigmapping" is the one missing in that list as in the query its mentioned.

- With these entries in DB, I am deleting only one config version made by "kuldeep", not every entry he made correct?

Thanks,

avatar
Master Guru

@Jobin George

Thanks! I have corrected the table name.

That's correct! Only one config made by 'kuldeep' will be deleted.