Bug 204341 - No files deployed on Config Server Action failure
Summary: No files deployed on Config Server Action failure
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Configuration Management
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bryan Kearney
QA Contact: Beth Nackashi
URL: https://rhn.webdev.redhat.com/network...
Whiteboard:
Depends On:
Blocks: rhn500h-config-mgmt
TreeView+ depends on / blocked
 
Reported: 2006-08-28 16:28 UTC by Partha Aji
Modified: 2013-01-10 08:54 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-02-16 15:50:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Partha Aji 2006-08-28 16:28:47 UTC
Description of problem:
If I am deploying 5 config files to a system and ONE of the files has the wrong
permissions to get copied to a directory, the rest of the files fail the deploy..

Here is an example... I am deploying the following 5 files
File /etc/dummy.txt
File /etc/ritigowla-dummy.txt
File /home/rdu/paji/dummy.txt
File /tmp/dummy.txt
Directory /tmp/dummy_dir/

and I am using the root password to deploy these files..
/home/rdu/paji/dummy.txt is on automount (NIS) so I can't use local machine root
password  to deploy it.

I correctly get the 
"
Failed: Failed deployment, rolled back: [Errno 13] Permission denied:
'/home/rdu/paji/.rhn-cfg-tmp-7711-1156778251.04237294'
"
when I do the rhn_check.
But NONE of the other files are deployed.. Also the following query-->
"
select cfn.path,  racr.FAILURE_ID  from rhnActionConfigRevision  racr
    INNER JOIN  rhnConfigRevision cr ON cr.id = racr.CONFIG_REVISION_ID
    INNER JOIN  rhnConfigFile cf ON cf.id = cr.config_file_id
    INNER JOIN  rhnConfigFileName cfn ON cfn.id = cf.config_file_name_id
where
    racr.action_id = 40014121
    ;
"
-> returns ->

PATH                     FAILURE_ID
------------------------ ----------
/tmp/dummy.txt                 NULL
/tmp/dummy_dir                 NULL
/home/rdu/paji/dummy.txt       NULL
/etc/dummy.txt                 NULL
/etc/ritigowla-dummy.txt       NULL

==> There was NO failure on any of the files... 
However ->
rhn@webdev> select status, result_code from rhnServerAction where action_id =
40014121;

STATUS RESULT_CODE
------ -----------
     3          49

And
rhn@webdev> select result_msg from rhnServerAction where action_id = 40014121;
RESULT_MSG
---------------------------------------------------------------------------------------------------------------------
Failed deployment, rolled back:  [Errno 13] Permission denied:
'/home/rdu/paji/.rhn-cfg-tmp-7711-1156778251.04237294'


So it seems to be the case that a permission error on a single file is deemed as
a failure on an entire action and none of the files get deployed...


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


How reproducible:
Always

Steps to Reproduce:
1. Register a system to webdev
2. Logon on to webdev and select Systems-> <system_name> 
3. Provide provisioning
4. Click on Channels and create a new Channel
5. Create a bunch of files, set the path of one of the files in /etc and another
under /home/rdu/<user_name> (hopefully your system will be on automount so the
root passwords will be different and thus get  a permission denied )..... 
6. Associate the ConfigChannel to your system
7. Schedule a deploy...
8. On your client do a sudo /usr/sbin/rhn_check
9. 

  
Actual results:
1) On the prompt "[Errno 13] Permission denied:
'/home/rdu/paji/.rhn-cfg-tmp-7711-1156778251.04237294'"
2) NO rows when I run this query ->
"
select cfn.path,  racr.FAILURE_ID  from rhnActionConfigRevision  racr
    INNER JOIN  rhnConfigRevision cr ON cr.id = racr.CONFIG_REVISION_ID
    INNER JOIN  rhnConfigFile cf ON cf.id = cr.config_file_id
    INNER JOIN  rhnConfigFileName cfn ON cfn.id = cf.config_file_name_id
where
    racr.action_id = 40014121 and
    racr.FAILURE_ID is not null
    ;
"
3. ls on all the deployed files other than the one under /home directory,
returns empty results..


Expected results:
1) On the prompt "[Errno 13] Permission denied:
'/home/rdu/paji/.rhn-cfg-tmp-7711-1156778251.04237294'"

2) Should have exactly One row when I run this query ->
"
select cfn.path,  racr.FAILURE_ID  from rhnActionConfigRevision  racr
    INNER JOIN  rhnConfigRevision cr ON cr.id = racr.CONFIG_REVISION_ID
    INNER JOIN  rhnConfigFile cf ON cf.id = cr.config_file_id
    INNER JOIN  rhnConfigFileName cfn ON cfn.id = cf.config_file_name_id
where
    racr.action_id = 40014121 and
    racr.FAILURE_ID is not null
    ;
"

3. ls on all the deployed files other than the one under /home directory,
returns the deployed file..


Additional info:

Comment 1 Bret McMillan 2007-02-16 15:50:26 UTC
This is working as designed.  We view a scheduled config deployment as an atomic
transation.


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