Skip to content

fix buffer::list::zero(unsigned o, unsigned l) to act on all buffer::ptr - #53

Merged
liewegas merged 1 commit into
masterfrom
unknown repository
Feb 14, 2013
Merged

liewegas merged 1 commit into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Feb 14, 2013

Copy link
Copy Markdown

When buffer::list::zero was called on a buffer::list with "ABC" and
"DEF" in two different buffer::ptr with buffer::list::zero(4, 1) it
did nothing. The expected result is that the "DEF" buffer::ptr is
modified to "D\0F"

The test to check if the pointer is past the end of range to be zeroed
was reversed. It was o+l >= p which would always be true if the range
spans over the first buffer::ptr . It must be "o+l <= p" meaning the
pointer is past the end of the range and there is no need to loop over
the remaining buffer::ptr in the buffer::list

The p+it->length() >= o+l part of the if (p >= o && p+it->length() >=
o+l) test was also reversed. When called on "ABC" with zero(0, 1) it
would match because the range to be zeroed is contained in the
buffer::ptr. The call to it->zero() would zero the entire buffer::ptr
instead of just the first character.

unit tests are added to demonstrate the two problems with the previous
code and show that the patch fixes them.

http://tracker.ceph.com/issues/4123 refs #4123

Signed-off-by: Loic Dachary [email protected]

When buffer::list::zero was called on a buffer::list with "ABC" and
"DEF" in two different buffer::ptr with buffer::list::zero(4, 1) it
did nothing. The expected result is that the "DEF" buffer::ptr is
modified to "D\0F"

The test to check if the pointer is past the end of range to be zeroed
was reversed. It was o+l >= p which would always be true if the range
spans over the first buffer::ptr . It must be "o+l <= p" meaning the
pointer is past the end of the range and there is no need to loop over
the remaining buffer::ptr in the buffer::list

The p+it->length() >= o+l part of the if (p >= o && p+it->length() >=
o+l) test was also reversed. When called on "ABC" with zero(0, 1) it
would match because the range to be zeroed is contained in the
buffer::ptr. The call to it->zero() would zero the entire buffer::ptr
instead of just the first character.

unit tests are added to demonstrate the two problems with the previous
code and show that the patch fixes them.

http://tracker.ceph.com/issues/4123 refs #4123

Signed-off-by: Loic Dachary <[email protected]>
liewegas added a commit that referenced this pull request Feb 14, 2013
fix buffer::list::zero(unsigned o, unsigned l) to act on all buffer::ptr

Backport: bobtail
Reviewed-by: Sage Weil <[email protected]>
@liewegas
liewegas merged commit ffbc085 into ceph:master Feb 14, 2013
XinzeChi pushed a commit to XinzeChi/ceph that referenced this pull request Jan 29, 2016
PrioritizedQueue optimization and some trivial optimization
liewegas pushed a commit that referenced this pull request Dec 14, 2016
use notcmalloc to fix leak checking
tspmelo pushed a commit to tspmelo/ceph that referenced this pull request Jan 31, 2018
mgr/dashboard_v2: Don't use localized config for auth
ivancich added a commit to ivancich/ceph-fork that referenced this pull request May 11, 2018
effea49 Merge pull request ceph#46 from ivancich/wip-add-cost
6f8e3d6 Allow the dmclock library to handle the "cost" of an operation/request. This is in contrast to just measuring ops. If the cost is set at the value 1, then it's equivalent to the old code.
3d777c1 Merge pull request ceph#55 from ceph/wip-da-sca-20180425
c7e4470 Update .gitignore to deal with cscope files.
3b5e95d Merge pull request ceph#53 from yzhan298/mod-parameter
653d149 misc: mark constructors as explicit
6a4a8e7 Change a variable name from delay to finishing_check_period
c4334e5 Merge pull request ceph#52 from Rubonnek/pass-by-reference
2358ec4 Added const references to various function parameters

git-subtree-dir: src/dmclock
git-subtree-split: effea49
galsalomon66 referenced this pull request in galsalomon66/ceph Sep 17, 2022
* in case of the following: /( 1 == 1) == true/  AST should handle the case of operand of type predicate while creating subtree for compare-operation; meaning the left-side reside on condQ and not in exprQ

Signed-off-by: gal salomon <[email protected]>

* s3select: support true/false keywords

Signed-off-by: Albin Antony <[email protected]>

* remove condQ; all statements logical predicates and non logical predicates using the same queue(exprQ); projection column can be predicate

Signed-off-by: gal salomon <[email protected]>

* not operator can handle variable

Signed-off-by: gal salomon <[email protected]>

* adding test for not operator ; predicate on projection

Signed-off-by: gal salomon <[email protected]>

* multi-row tests

Signed-off-by: Albin Antony <[email protected]>

* support bool cast

Signed-off-by: Albin Antony <[email protected]>

* reject arithmetic operations with bool

Signed-off-by: Albin Antony <[email protected]>

* bug fix: numeric to bool type

Signed-off-by: Albin Antony <[email protected]>

* enable alias to predicate as projection, i.e. as other projections also predicates could reference by alias

Signed-off-by: gal salomon <[email protected]>

Co-authored-by: gal salomon <[email protected]>
irq0 pushed a commit to irq0/ceph that referenced this pull request Oct 25, 2022
rgw/build: Add FMT_DEPRECATED_OSTREAM flag to avoid compilation issues
leonid-s-usov pushed a commit to leonid-s-usov/ceph-ceph that referenced this pull request Mar 10, 2024
The cephadm sos command fails

This commit can be safely squashed along with:
4b0049f
mgr/callhome: cephadm sos command wrapper
in future releases

Resolves: rhbz#2267676
          https://bugzilla.redhat.com/show_bug.cgi?id=2267676

Signed-off-by: Juan Miguel Olmo Martínez <[email protected]>
(cherry picked from commit 1d413c767d4dc034202907e1393f9e69808004db)
yuvalif pushed a commit to yuvalif/ceph that referenced this pull request Mar 13, 2024
The cephadm sos command fails

This commit can be safely squashed along with:
4b0049f
mgr/callhome: cephadm sos command wrapper
in future releases

Resolves: rhbz#2267676
          https://bugzilla.redhat.com/show_bug.cgi?id=2267676

Signed-off-by: Juan Miguel Olmo Martínez <[email protected]>
(cherry picked from commit 1d413c767d4dc034202907e1393f9e69808004db)
yuvalif pushed a commit to yuvalif/ceph that referenced this pull request Aug 21, 2024
This is a combination of 7 commits in order to ease maintenance.

This commit is extracted from the initial commit that added the
call_home_agent mgr module (de6cbfb),
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/de6cbfbde53c64877941751d2ef5f8198ae5dccc

This commit was created with:

  $ git format-patch -1 de6cbfb -- src/cephadm/cephadm.py
  0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  $
  $ git apply -3 0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.
  $
  $ git add src/cephadm/cephadm.py

Signed-off-by: Yaarit Hatuka <[email protected]>

cephadm: fix setting first and last name fields for call home

During bootstrap we were setting the email field to
be the email, first name, and last name in succession
so if all these fields were provided the email would end
up as the last name and the actual email and first name
would be thrown away.

The fix is pretty self-explanatory

Resvoles: rhbz#2242916

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 54a07e5)
(cherry picked from commit 9989d06)

cephadm: fix call home bootstrap error message

Specifically

--ceph-call-home-contect-email ("contect")-> --ceph-call-home-contact-email
--ceph-call-home-context-phone ("context") -> --ceph-call-home-contact-phone
--ceph-call-home-contact-first-name (for last name setting)
-> --ceph-call-home-contact-last-name

Resolves: rhbz#2242918

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 1623928)
(cherry picked from commit 0c1fea8)

cephadm: fix bootstrap with --enable-storage-insights set

If --enable-storage-insights is set, there was an
additional check that we aren't enabling storage insights
but not call home. This check was broken as it was
checking "enable_call_home" instead of "enable_ibm_call_home"
attribute on the ctx object.

Resolves: rhbz#2243115

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 41e2ef7)
(cherry picked from commit 4d8b471)

Conflicts:
	src/cephadm/cephadm.py

<<<<<<< HEAD
    # initial vars
    ctx.fsid = ctx.fsid or make_fsid()
    fsid = ctx.fsid
    if not is_fsid(fsid):
        raise Error('not an fsid: %s' % fsid)

    if ctx.enable_storage_insights and not ctx.enable_call_home:
=======
    if ctx.enable_storage_insights and not ctx.enable_ibm_call_home:
>>>>>>> 4d8b471 (cephadm: fix bootstrap with --enable-storage-insights set)
        raise Error('Cannot enable Storage Insights without enabling call home (--enable-ibm-call-home)')
    elif ctx.enable_ibm_call_home:
        verify_call_home_settings(ctx)

Conflict was reslolved by keeping everything, except for:
    if ctx.enable_storage_insights and not ctx.enable_call_home:

mgr/callhome: cephadm sos command wrapper

Implementation of a wrapper for the sos command in cephadm

Signed-off-by: Juan Miguel Olmo Martínez <[email protected]>
(cherry picked from commit e2108ba60b025d2813bcece7fa4dbb7998893ad7)

Resolves: rhbz#2264462
          https://bugzilla.redhat.com/show_bug.cgi?id=2264462
(cherry picked from commit 4b0049f)

mgr/ccha: Fix cephadm sos command error (ceph#53)

The cephadm sos command fails

This commit can be safely squashed along with:
4b0049f
mgr/callhome: cephadm sos command wrapper
in future releases

Resolves: rhbz#2267676
          https://bugzilla.redhat.com/show_bug.cgi?id=2267676

Signed-off-by: Juan Miguel Olmo Martínez <[email protected]>
(cherry picked from commit 1d413c767d4dc034202907e1393f9e69808004db)
(cherry picked from commit 873b28e)

cephadm: make cephadm sos cmd more robust (ceph#56)

This commit is extracted from bac75bb
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/bac75bb1b9052982fd9b4ebc3ff5116b67081c54

This commit was created with:

  $ git format-patch -1 bac75bb -- src/cephadm/cephadm.py
  0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  $
  $ git apply -3 0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.

Signed-off-by: Yaarit Hatuka <[email protected]>
yuvalif pushed a commit to yuvalif/ceph that referenced this pull request Sep 16, 2024
This is a combination of 7 commits in order to ease maintenance.

This commit is extracted from the initial commit that added the
call_home_agent mgr module (de6cbfb),
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/de6cbfbde53c64877941751d2ef5f8198ae5dccc

This commit was created with:

  $ git format-patch -1 de6cbfb -- src/cephadm/cephadm.py
  0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  $
  $ git apply -3 0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.
  $
  $ git add src/cephadm/cephadm.py

Signed-off-by: Yaarit Hatuka <[email protected]>

cephadm: fix setting first and last name fields for call home

During bootstrap we were setting the email field to
be the email, first name, and last name in succession
so if all these fields were provided the email would end
up as the last name and the actual email and first name
would be thrown away.

The fix is pretty self-explanatory

Resvoles: rhbz#2242916

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 54a07e5)
(cherry picked from commit 9989d06)

cephadm: fix call home bootstrap error message

Specifically

--ceph-call-home-contect-email ("contect")-> --ceph-call-home-contact-email
--ceph-call-home-context-phone ("context") -> --ceph-call-home-contact-phone
--ceph-call-home-contact-first-name (for last name setting)
-> --ceph-call-home-contact-last-name

Resolves: rhbz#2242918

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 1623928)
(cherry picked from commit 0c1fea8)

cephadm: fix bootstrap with --enable-storage-insights set

If --enable-storage-insights is set, there was an
additional check that we aren't enabling storage insights
but not call home. This check was broken as it was
checking "enable_call_home" instead of "enable_ibm_call_home"
attribute on the ctx object.

Resolves: rhbz#2243115

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 41e2ef7)
(cherry picked from commit 4d8b471)

Conflicts:
	src/cephadm/cephadm.py

<<<<<<< HEAD
    # initial vars
    ctx.fsid = ctx.fsid or make_fsid()
    fsid = ctx.fsid
    if not is_fsid(fsid):
        raise Error('not an fsid: %s' % fsid)

    if ctx.enable_storage_insights and not ctx.enable_call_home:
=======
    if ctx.enable_storage_insights and not ctx.enable_ibm_call_home:
>>>>>>> 4d8b471 (cephadm: fix bootstrap with --enable-storage-insights set)
        raise Error('Cannot enable Storage Insights without enabling call home (--enable-ibm-call-home)')
    elif ctx.enable_ibm_call_home:
        verify_call_home_settings(ctx)

Conflict was reslolved by keeping everything, except for:
    if ctx.enable_storage_insights and not ctx.enable_call_home:

mgr/callhome: cephadm sos command wrapper

Implementation of a wrapper for the sos command in cephadm

Signed-off-by: Juan Miguel Olmo Martínez <[email protected]>
(cherry picked from commit e2108ba60b025d2813bcece7fa4dbb7998893ad7)

Resolves: rhbz#2264462
          https://bugzilla.redhat.com/show_bug.cgi?id=2264462
(cherry picked from commit 4b0049f)

mgr/ccha: Fix cephadm sos command error (ceph#53)

The cephadm sos command fails

This commit can be safely squashed along with:
4b0049f
mgr/callhome: cephadm sos command wrapper
in future releases

Resolves: rhbz#2267676
          https://bugzilla.redhat.com/show_bug.cgi?id=2267676

Signed-off-by: Juan Miguel Olmo Martínez <[email protected]>
(cherry picked from commit 1d413c767d4dc034202907e1393f9e69808004db)
(cherry picked from commit 873b28e)

cephadm: make cephadm sos cmd more robust (ceph#56)

This commit is extracted from bac75bb
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/bac75bb1b9052982fd9b4ebc3ff5116b67081c54

This commit was created with:

  $ git format-patch -1 bac75bb -- src/cephadm/cephadm.py
  0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  $
  $ git apply -3 0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.

Signed-off-by: Yaarit Hatuka <[email protected]>
(cherry picked from commit 37be1c3)

Conflicts:
        src/cephadm/cephadm.py

The conflict we saw:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

<<<<<<< HEAD
=======
    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # enable autotune for osd_memory_target
    logger.info('Enabling autotune for osd_memory_target')
    cli(['config', 'set', 'osd', 'osd_memory_target_autotune', 'true'])

>>>>>>> 37be1c3 (cephadm: add Call Home and Storage Insights)
    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```

The conflict was resolved by removing the osd autotune lines:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```
mattbenjamin pushed a commit to linuxbox2/ceph that referenced this pull request Oct 22, 2024
This is a combination of 7 commits in order to ease maintenance.

This commit is extracted from the initial commit that added the
call_home_agent mgr module (de6cbfb),
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/de6cbfbde53c64877941751d2ef5f8198ae5dccc

This commit was created with:

  $ git format-patch -1 de6cbfb -- src/cephadm/cephadm.py
  0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  $
  $ git apply -3 0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.
  $
  $ git add src/cephadm/cephadm.py

Signed-off-by: Yaarit Hatuka <[email protected]>

cephadm: fix setting first and last name fields for call home

During bootstrap we were setting the email field to
be the email, first name, and last name in succession
so if all these fields were provided the email would end
up as the last name and the actual email and first name
would be thrown away.

The fix is pretty self-explanatory

Resvoles: rhbz#2242916

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 54a07e5)
(cherry picked from commit 9989d06)

cephadm: fix call home bootstrap error message

Specifically

--ceph-call-home-contect-email ("contect")-> --ceph-call-home-contact-email
--ceph-call-home-context-phone ("context") -> --ceph-call-home-contact-phone
--ceph-call-home-contact-first-name (for last name setting)
-> --ceph-call-home-contact-last-name

Resolves: rhbz#2242918

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 1623928)
(cherry picked from commit 0c1fea8)

cephadm: fix bootstrap with --enable-storage-insights set

If --enable-storage-insights is set, there was an
additional check that we aren't enabling storage insights
but not call home. This check was broken as it was
checking "enable_call_home" instead of "enable_ibm_call_home"
attribute on the ctx object.

Resolves: rhbz#2243115

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 41e2ef7)
(cherry picked from commit 4d8b471)

Conflicts:
	src/cephadm/cephadm.py

<<<<<<< HEAD
    # initial vars
    ctx.fsid = ctx.fsid or make_fsid()
    fsid = ctx.fsid
    if not is_fsid(fsid):
        raise Error('not an fsid: %s' % fsid)

    if ctx.enable_storage_insights and not ctx.enable_call_home:
=======
    if ctx.enable_storage_insights and not ctx.enable_ibm_call_home:
>>>>>>> 4d8b471 (cephadm: fix bootstrap with --enable-storage-insights set)
        raise Error('Cannot enable Storage Insights without enabling call home (--enable-ibm-call-home)')
    elif ctx.enable_ibm_call_home:
        verify_call_home_settings(ctx)

Conflict was reslolved by keeping everything, except for:
    if ctx.enable_storage_insights and not ctx.enable_call_home:

mgr/callhome: cephadm sos command wrapper

Implementation of a wrapper for the sos command in cephadm

Signed-off-by: Juan Miguel Olmo Martínez <[email protected]>
(cherry picked from commit e2108ba60b025d2813bcece7fa4dbb7998893ad7)

Resolves: rhbz#2264462
          https://bugzilla.redhat.com/show_bug.cgi?id=2264462
(cherry picked from commit 4b0049f)

mgr/ccha: Fix cephadm sos command error (ceph#53)

The cephadm sos command fails

This commit can be safely squashed along with:
4b0049f
mgr/callhome: cephadm sos command wrapper
in future releases

Resolves: rhbz#2267676
          https://bugzilla.redhat.com/show_bug.cgi?id=2267676

Signed-off-by: Juan Miguel Olmo Martínez <[email protected]>
(cherry picked from commit 1d413c767d4dc034202907e1393f9e69808004db)
(cherry picked from commit 873b28e)

cephadm: make cephadm sos cmd more robust (ceph#56)

This commit is extracted from bac75bb
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/bac75bb1b9052982fd9b4ebc3ff5116b67081c54

This commit was created with:

  $ git format-patch -1 bac75bb -- src/cephadm/cephadm.py
  0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  $
  $ git apply -3 0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.

Signed-off-by: Yaarit Hatuka <[email protected]>
(cherry picked from commit 37be1c3)

Conflicts:
        src/cephadm/cephadm.py

The conflict we saw:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

<<<<<<< HEAD
=======
    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # enable autotune for osd_memory_target
    logger.info('Enabling autotune for osd_memory_target')
    cli(['config', 'set', 'osd', 'osd_memory_target_autotune', 'true'])

>>>>>>> 37be1c3 (cephadm: add Call Home and Storage Insights)
    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```

The conflict was resolved by removing the osd autotune lines:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```
athanatos pushed a commit to athanatos/ceph that referenced this pull request Feb 14, 2025
Change variable name delay to finishing_check_period for clarity

Reviewed-by: J. Eric Ivancich <[email protected]>
andrewschoen referenced this pull request in ibmstorage/ceph Feb 25, 2025
This is a combination of 7 commits in order to ease maintenance.

This commit is extracted from the initial commit that added the
call_home_agent mgr module (de6cbfb),
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/de6cbfbde53c64877941751d2ef5f8198ae5dccc

This commit was created with:

  $ git format-patch -1 de6cbfb -- src/cephadm/cephadm.py
  0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  $
  $ git apply -3 0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.
  $
  $ git add src/cephadm/cephadm.py

Signed-off-by: Yaarit Hatuka <[email protected]>

cephadm: fix setting first and last name fields for call home

During bootstrap we were setting the email field to
be the email, first name, and last name in succession
so if all these fields were provided the email would end
up as the last name and the actual email and first name
would be thrown away.

The fix is pretty self-explanatory

Resvoles: rhbz#2242916

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 54a07e5)
(cherry picked from commit 9989d06)

cephadm: fix call home bootstrap error message

Specifically

--ceph-call-home-contect-email ("contect")-> --ceph-call-home-contact-email
--ceph-call-home-context-phone ("context") -> --ceph-call-home-contact-phone
--ceph-call-home-contact-first-name (for last name setting)
-> --ceph-call-home-contact-last-name

Resolves: rhbz#2242918

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 1623928)
(cherry picked from commit 0c1fea8)

cephadm: fix bootstrap with --enable-storage-insights set

If --enable-storage-insights is set, there was an
additional check that we aren't enabling storage insights
but not call home. This check was broken as it was
checking "enable_call_home" instead of "enable_ibm_call_home"
attribute on the ctx object.

Resolves: rhbz#2243115

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 41e2ef7)
(cherry picked from commit 4d8b471)

Conflicts:
	src/cephadm/cephadm.py

<<<<<<< HEAD
    # initial vars
    ctx.fsid = ctx.fsid or make_fsid()
    fsid = ctx.fsid
    if not is_fsid(fsid):
        raise Error('not an fsid: %s' % fsid)

    if ctx.enable_storage_insights and not ctx.enable_call_home:
=======
    if ctx.enable_storage_insights and not ctx.enable_ibm_call_home:
>>>>>>> 4d8b471 (cephadm: fix bootstrap with --enable-storage-insights set)
        raise Error('Cannot enable Storage Insights without enabling call home (--enable-ibm-call-home)')
    elif ctx.enable_ibm_call_home:
        verify_call_home_settings(ctx)

Conflict was reslolved by keeping everything, except for:
    if ctx.enable_storage_insights and not ctx.enable_call_home:

mgr/callhome: cephadm sos command wrapper

Implementation of a wrapper for the sos command in cephadm

Signed-off-by: Juan Miguel Olmo Martínez <[email protected]>
(cherry picked from commit e2108ba60b025d2813bcece7fa4dbb7998893ad7)

Resolves: rhbz#2264462
          https://bugzilla.redhat.com/show_bug.cgi?id=2264462
(cherry picked from commit 4b0049f)

mgr/ccha: Fix cephadm sos command error (#53)

The cephadm sos command fails

This commit can be safely squashed along with:
4b0049f
mgr/callhome: cephadm sos command wrapper
in future releases

Resolves: rhbz#2267676
          https://bugzilla.redhat.com/show_bug.cgi?id=2267676

Signed-off-by: Juan Miguel Olmo Martínez <[email protected]>
(cherry picked from commit 1d413c767d4dc034202907e1393f9e69808004db)
(cherry picked from commit 873b28e)

cephadm: make cephadm sos cmd more robust (#56)

This commit is extracted from bac75bb
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/bac75bb1b9052982fd9b4ebc3ff5116b67081c54

This commit was created with:

  $ git format-patch -1 bac75bb -- src/cephadm/cephadm.py
  0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  $
  $ git apply -3 0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.

Signed-off-by: Yaarit Hatuka <[email protected]>
(cherry picked from commit 37be1c3)

Conflicts:
        src/cephadm/cephadm.py

The conflict we saw:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

<<<<<<< HEAD
=======
    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # enable autotune for osd_memory_target
    logger.info('Enabling autotune for osd_memory_target')
    cli(['config', 'set', 'osd', 'osd_memory_target_autotune', 'true'])

>>>>>>> 37be1c3 (cephadm: add Call Home and Storage Insights)
    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```

The conflict was resolved by removing the osd autotune lines:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```
rishabh-d-dave pushed a commit to rishabh-d-dave/ceph that referenced this pull request Mar 19, 2025
This is a combination of 7 commits in order to ease maintenance.

This commit is extracted from the initial commit that added the
call_home_agent mgr module (de6cbfb),
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/de6cbfbde53c64877941751d2ef5f8198ae5dccc

This commit was created with:

  $ git format-patch -1 de6cbfb -- src/cephadm/cephadm.py
  0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  $
  $ git apply -3 0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.
  $
  $ git add src/cephadm/cephadm.py

Signed-off-by: Yaarit Hatuka <[email protected]>

cephadm: fix setting first and last name fields for call home

During bootstrap we were setting the email field to
be the email, first name, and last name in succession
so if all these fields were provided the email would end
up as the last name and the actual email and first name
would be thrown away.

The fix is pretty self-explanatory

Resvoles: rhbz#2242916

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 54a07e5)
(cherry picked from commit 9989d06)

cephadm: fix call home bootstrap error message

Specifically

--ceph-call-home-contect-email ("contect")-> --ceph-call-home-contact-email
--ceph-call-home-context-phone ("context") -> --ceph-call-home-contact-phone
--ceph-call-home-contact-first-name (for last name setting)
-> --ceph-call-home-contact-last-name

Resolves: rhbz#2242918

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 1623928)
(cherry picked from commit 0c1fea8)

cephadm: fix bootstrap with --enable-storage-insights set

If --enable-storage-insights is set, there was an
additional check that we aren't enabling storage insights
but not call home. This check was broken as it was
checking "enable_call_home" instead of "enable_ibm_call_home"
attribute on the ctx object.

Resolves: rhbz#2243115

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 41e2ef7)
(cherry picked from commit 4d8b471)

Conflicts:
	src/cephadm/cephadm.py

<<<<<<< HEAD
    # initial vars
    ctx.fsid = ctx.fsid or make_fsid()
    fsid = ctx.fsid
    if not is_fsid(fsid):
        raise Error('not an fsid: %s' % fsid)

    if ctx.enable_storage_insights and not ctx.enable_call_home:
=======
    if ctx.enable_storage_insights and not ctx.enable_ibm_call_home:
>>>>>>> 4d8b471 (cephadm: fix bootstrap with --enable-storage-insights set)
        raise Error('Cannot enable Storage Insights without enabling call home (--enable-ibm-call-home)')
    elif ctx.enable_ibm_call_home:
        verify_call_home_settings(ctx)

Conflict was reslolved by keeping everything, except for:
    if ctx.enable_storage_insights and not ctx.enable_call_home:

mgr/callhome: cephadm sos command wrapper

Implementation of a wrapper for the sos command in cephadm

Signed-off-by: Juan Miguel Olmo Martínez <[email protected]>
(cherry picked from commit e2108ba60b025d2813bcece7fa4dbb7998893ad7)

Resolves: rhbz#2264462
          https://bugzilla.redhat.com/show_bug.cgi?id=2264462
(cherry picked from commit 4b0049f)

mgr/ccha: Fix cephadm sos command error (ceph#53)

The cephadm sos command fails

This commit can be safely squashed along with:
4b0049f
mgr/callhome: cephadm sos command wrapper
in future releases

Resolves: rhbz#2267676
          https://bugzilla.redhat.com/show_bug.cgi?id=2267676

Signed-off-by: Juan Miguel Olmo Martínez <[email protected]>
(cherry picked from commit 1d413c767d4dc034202907e1393f9e69808004db)
(cherry picked from commit 873b28e)

cephadm: make cephadm sos cmd more robust (ceph#56)

This commit is extracted from bac75bb
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/bac75bb1b9052982fd9b4ebc3ff5116b67081c54

This commit was created with:

  $ git format-patch -1 bac75bb -- src/cephadm/cephadm.py
  0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  $
  $ git apply -3 0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.

Signed-off-by: Yaarit Hatuka <[email protected]>
(cherry picked from commit 37be1c3)

Conflicts:
        src/cephadm/cephadm.py

The conflict we saw:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

<<<<<<< HEAD
=======
    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # enable autotune for osd_memory_target
    logger.info('Enabling autotune for osd_memory_target')
    cli(['config', 'set', 'osd', 'osd_memory_target_autotune', 'true'])

>>>>>>> 37be1c3 (cephadm: add Call Home and Storage Insights)
    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```

The conflict was resolved by removing the osd autotune lines:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```
hasan4791 pushed a commit to hasan4791/ceph that referenced this pull request Jan 6, 2026
This is a combination of 7 commits in order to ease maintenance.

This commit is extracted from the initial commit that added the
call_home_agent mgr module (de6cbfb),
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/de6cbfbde53c64877941751d2ef5f8198ae5dccc

This commit was created with:

  $ git format-patch -1 de6cbfb -- src/cephadm/cephadm.py
  0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  $
  $ git apply -3 0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.
  $
  $ git add src/cephadm/cephadm.py

Signed-off-by: Yaarit Hatuka <[email protected]>

cephadm: fix setting first and last name fields for call home

During bootstrap we were setting the email field to
be the email, first name, and last name in succession
so if all these fields were provided the email would end
up as the last name and the actual email and first name
would be thrown away.

The fix is pretty self-explanatory

Resvoles: rhbz#2242916

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 54a07e5)
(cherry picked from commit 9989d06)

cephadm: fix call home bootstrap error message

Specifically

--ceph-call-home-contect-email ("contect")-> --ceph-call-home-contact-email
--ceph-call-home-context-phone ("context") -> --ceph-call-home-contact-phone
--ceph-call-home-contact-first-name (for last name setting)
-> --ceph-call-home-contact-last-name

Resolves: rhbz#2242918

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 1623928)
(cherry picked from commit 0c1fea8)

cephadm: fix bootstrap with --enable-storage-insights set

If --enable-storage-insights is set, there was an
additional check that we aren't enabling storage insights
but not call home. This check was broken as it was
checking "enable_call_home" instead of "enable_ibm_call_home"
attribute on the ctx object.

Resolves: rhbz#2243115

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 41e2ef7)
(cherry picked from commit 4d8b471)

Conflicts:
	src/cephadm/cephadm.py

<<<<<<< HEAD
    # initial vars
    ctx.fsid = ctx.fsid or make_fsid()
    fsid = ctx.fsid
    if not is_fsid(fsid):
        raise Error('not an fsid: %s' % fsid)

    if ctx.enable_storage_insights and not ctx.enable_call_home:
=======
    if ctx.enable_storage_insights and not ctx.enable_ibm_call_home:
>>>>>>> 4d8b471 (cephadm: fix bootstrap with --enable-storage-insights set)
        raise Error('Cannot enable Storage Insights without enabling call home (--enable-ibm-call-home)')
    elif ctx.enable_ibm_call_home:
        verify_call_home_settings(ctx)

Conflict was reslolved by keeping everything, except for:
    if ctx.enable_storage_insights and not ctx.enable_call_home:

mgr/callhome: cephadm sos command wrapper

Implementation of a wrapper for the sos command in cephadm

Signed-off-by: Juan Miguel Olmo Martínez <[email protected]>
(cherry picked from commit e2108ba60b025d2813bcece7fa4dbb7998893ad7)

Resolves: rhbz#2264462
          https://bugzilla.redhat.com/show_bug.cgi?id=2264462
(cherry picked from commit 4b0049f)

mgr/ccha: Fix cephadm sos command error (ceph#53)

The cephadm sos command fails

This commit can be safely squashed along with:
4b0049f
mgr/callhome: cephadm sos command wrapper
in future releases

Resolves: rhbz#2267676
          https://bugzilla.redhat.com/show_bug.cgi?id=2267676

Signed-off-by: Juan Miguel Olmo Martínez <[email protected]>
(cherry picked from commit 1d413c767d4dc034202907e1393f9e69808004db)
(cherry picked from commit 873b28e)

cephadm: make cephadm sos cmd more robust (ceph#56)

This commit is extracted from bac75bb
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/bac75bb1b9052982fd9b4ebc3ff5116b67081c54

This commit was created with:

  $ git format-patch -1 bac75bb -- src/cephadm/cephadm.py
  0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  $
  $ git apply -3 0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.

Signed-off-by: Yaarit Hatuka <[email protected]>
(cherry picked from commit 37be1c3)

Conflicts:
        src/cephadm/cephadm.py

The conflict we saw:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

<<<<<<< HEAD
=======
    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # enable autotune for osd_memory_target
    logger.info('Enabling autotune for osd_memory_target')
    cli(['config', 'set', 'osd', 'osd_memory_target_autotune', 'true'])

>>>>>>> 37be1c3 (cephadm: add Call Home and Storage Insights)
    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```

The conflict was resolved by removing the osd autotune lines:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```

(cherry picked from commit 8b565c3)
phlogistonjohn pushed a commit to phlogistonjohn/ceph that referenced this pull request Mar 6, 2026
This is a combination of 7 commits in order to ease maintenance.

This commit is extracted from the initial commit that added the
call_home_agent mgr module (de6cbfb),
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/de6cbfbde53c64877941751d2ef5f8198ae5dccc

This commit was created with:

  $ git format-patch -1 de6cbfb -- src/cephadm/cephadm.py
  0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  $
  $ git apply -3 0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.
  $
  $ git add src/cephadm/cephadm.py

Signed-off-by: Yaarit Hatuka <[email protected]>

cephadm: fix setting first and last name fields for call home

During bootstrap we were setting the email field to
be the email, first name, and last name in succession
so if all these fields were provided the email would end
up as the last name and the actual email and first name
would be thrown away.

The fix is pretty self-explanatory

Resvoles: rhbz#2242916

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 54a07e5)
(cherry picked from commit 9989d06)

cephadm: fix call home bootstrap error message

Specifically

--ceph-call-home-contect-email ("contect")-> --ceph-call-home-contact-email
--ceph-call-home-context-phone ("context") -> --ceph-call-home-contact-phone
--ceph-call-home-contact-first-name (for last name setting)
-> --ceph-call-home-contact-last-name

Resolves: rhbz#2242918

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 1623928)
(cherry picked from commit 0c1fea8)

cephadm: fix bootstrap with --enable-storage-insights set

If --enable-storage-insights is set, there was an
additional check that we aren't enabling storage insights
but not call home. This check was broken as it was
checking "enable_call_home" instead of "enable_ibm_call_home"
attribute on the ctx object.

Resolves: rhbz#2243115

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 41e2ef7)
(cherry picked from commit 4d8b471)

Conflicts:
	src/cephadm/cephadm.py

<<<<<<< HEAD
    # initial vars
    ctx.fsid = ctx.fsid or make_fsid()
    fsid = ctx.fsid
    if not is_fsid(fsid):
        raise Error('not an fsid: %s' % fsid)

    if ctx.enable_storage_insights and not ctx.enable_call_home:
=======
    if ctx.enable_storage_insights and not ctx.enable_ibm_call_home:
>>>>>>> 4d8b471 (cephadm: fix bootstrap with --enable-storage-insights set)
        raise Error('Cannot enable Storage Insights without enabling call home (--enable-ibm-call-home)')
    elif ctx.enable_ibm_call_home:
        verify_call_home_settings(ctx)

Conflict was reslolved by keeping everything, except for:
    if ctx.enable_storage_insights and not ctx.enable_call_home:

mgr/callhome: cephadm sos command wrapper

Implementation of a wrapper for the sos command in cephadm

Signed-off-by: Juan Miguel Olmo Martínez <[email protected]>
(cherry picked from commit e2108ba60b025d2813bcece7fa4dbb7998893ad7)

Resolves: rhbz#2264462
          https://bugzilla.redhat.com/show_bug.cgi?id=2264462
(cherry picked from commit 4b0049f)

mgr/ccha: Fix cephadm sos command error (ceph#53)

The cephadm sos command fails

This commit can be safely squashed along with:
4b0049f
mgr/callhome: cephadm sos command wrapper
in future releases

Resolves: rhbz#2267676
          https://bugzilla.redhat.com/show_bug.cgi?id=2267676

Signed-off-by: Juan Miguel Olmo Martínez <[email protected]>
(cherry picked from commit 1d413c767d4dc034202907e1393f9e69808004db)
(cherry picked from commit 873b28e)

cephadm: make cephadm sos cmd more robust (ceph#56)

This commit is extracted from bac75bb
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/bac75bb1b9052982fd9b4ebc3ff5116b67081c54

This commit was created with:

  $ git format-patch -1 bac75bb -- src/cephadm/cephadm.py
  0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  $
  $ git apply -3 0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.

Signed-off-by: Yaarit Hatuka <[email protected]>
(cherry picked from commit 37be1c3)

Conflicts:
        src/cephadm/cephadm.py

The conflict we saw:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

<<<<<<< HEAD
=======
    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # enable autotune for osd_memory_target
    logger.info('Enabling autotune for osd_memory_target')
    cli(['config', 'set', 'osd', 'osd_memory_target_autotune', 'true'])

>>>>>>> 37be1c3 (cephadm: add Call Home and Storage Insights)
    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```

The conflict was resolved by removing the osd autotune lines:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```

(cherry picked from commit 8b565c3)
(cherry picked from commit a22f065)
phlogistonjohn pushed a commit to phlogistonjohn/ceph that referenced this pull request Mar 6, 2026
This is a combination of 7 commits in order to ease maintenance.

This commit is extracted from the initial commit that added the
call_home_agent mgr module (de6cbfb),
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/de6cbfbde53c64877941751d2ef5f8198ae5dccc

This commit was created with:

  $ git format-patch -1 de6cbfb -- src/cephadm/cephadm.py
  0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  $
  $ git apply -3 0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.
  $
  $ git add src/cephadm/cephadm.py

Signed-off-by: Yaarit Hatuka <[email protected]>

cephadm: fix setting first and last name fields for call home

During bootstrap we were setting the email field to
be the email, first name, and last name in succession
so if all these fields were provided the email would end
up as the last name and the actual email and first name
would be thrown away.

The fix is pretty self-explanatory

Resvoles: rhbz#2242916

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 54a07e5)
(cherry picked from commit 9989d06)

cephadm: fix call home bootstrap error message

Specifically

--ceph-call-home-contect-email ("contect")-> --ceph-call-home-contact-email
--ceph-call-home-context-phone ("context") -> --ceph-call-home-contact-phone
--ceph-call-home-contact-first-name (for last name setting)
-> --ceph-call-home-contact-last-name

Resolves: rhbz#2242918

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 1623928)
(cherry picked from commit 0c1fea8)

cephadm: fix bootstrap with --enable-storage-insights set

If --enable-storage-insights is set, there was an
additional check that we aren't enabling storage insights
but not call home. This check was broken as it was
checking "enable_call_home" instead of "enable_ibm_call_home"
attribute on the ctx object.

Resolves: rhbz#2243115

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 41e2ef7)
(cherry picked from commit 4d8b471)

Conflicts:
	src/cephadm/cephadm.py

<<<<<<< HEAD
    # initial vars
    ctx.fsid = ctx.fsid or make_fsid()
    fsid = ctx.fsid
    if not is_fsid(fsid):
        raise Error('not an fsid: %s' % fsid)

    if ctx.enable_storage_insights and not ctx.enable_call_home:
=======
    if ctx.enable_storage_insights and not ctx.enable_ibm_call_home:
>>>>>>> 4d8b471 (cephadm: fix bootstrap with --enable-storage-insights set)
        raise Error('Cannot enable Storage Insights without enabling call home (--enable-ibm-call-home)')
    elif ctx.enable_ibm_call_home:
        verify_call_home_settings(ctx)

Conflict was reslolved by keeping everything, except for:
    if ctx.enable_storage_insights and not ctx.enable_call_home:

mgr/callhome: cephadm sos command wrapper

Implementation of a wrapper for the sos command in cephadm

Signed-off-by: Juan Miguel Olmo Martínez <[email protected]>
(cherry picked from commit e2108ba60b025d2813bcece7fa4dbb7998893ad7)

Resolves: rhbz#2264462
          https://bugzilla.redhat.com/show_bug.cgi?id=2264462
(cherry picked from commit 4b0049f)

mgr/ccha: Fix cephadm sos command error (ceph#53)

The cephadm sos command fails

This commit can be safely squashed along with:
4b0049f
mgr/callhome: cephadm sos command wrapper
in future releases

Resolves: rhbz#2267676
          https://bugzilla.redhat.com/show_bug.cgi?id=2267676

Signed-off-by: Juan Miguel Olmo Martínez <[email protected]>
(cherry picked from commit 1d413c767d4dc034202907e1393f9e69808004db)
(cherry picked from commit 873b28e)

cephadm: make cephadm sos cmd more robust (ceph#56)

This commit is extracted from bac75bb
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/bac75bb1b9052982fd9b4ebc3ff5116b67081c54

This commit was created with:

  $ git format-patch -1 bac75bb -- src/cephadm/cephadm.py
  0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  $
  $ git apply -3 0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.

Signed-off-by: Yaarit Hatuka <[email protected]>
(cherry picked from commit 37be1c3)

Conflicts:
        src/cephadm/cephadm.py

The conflict we saw:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

<<<<<<< HEAD
=======
    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # enable autotune for osd_memory_target
    logger.info('Enabling autotune for osd_memory_target')
    cli(['config', 'set', 'osd', 'osd_memory_target_autotune', 'true'])

>>>>>>> 37be1c3 (cephadm: add Call Home and Storage Insights)
    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```

The conflict was resolved by removing the osd autotune lines:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```

(cherry picked from commit 8b565c3)
aainscow referenced this pull request in aainscow/ceph Jul 14, 2026
This is a combination of 7 commits in order to ease maintenance.

This commit is extracted from the initial commit that added the
call_home_agent mgr module (de6cbfb),
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/de6cbfbde53c64877941751d2ef5f8198ae5dccc

This commit was created with:

  $ git format-patch -1 de6cbfb -- src/cephadm/cephadm.py
  0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  $
  $ git apply -3 0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.
  $
  $ git add src/cephadm/cephadm.py

Signed-off-by: Yaarit Hatuka <[email protected]>

cephadm: fix setting first and last name fields for call home

During bootstrap we were setting the email field to
be the email, first name, and last name in succession
so if all these fields were provided the email would end
up as the last name and the actual email and first name
would be thrown away.

The fix is pretty self-explanatory

Resvoles: rhbz#2242916

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 54a07e5)
(cherry picked from commit 9989d06)

cephadm: fix call home bootstrap error message

Specifically

--ceph-call-home-contect-email ("contect")-> --ceph-call-home-contact-email
--ceph-call-home-context-phone ("context") -> --ceph-call-home-contact-phone
--ceph-call-home-contact-first-name (for last name setting)
-> --ceph-call-home-contact-last-name

Resolves: rhbz#2242918

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 1623928)
(cherry picked from commit 0c1fea8)

cephadm: fix bootstrap with --enable-storage-insights set

If --enable-storage-insights is set, there was an
additional check that we aren't enabling storage insights
but not call home. This check was broken as it was
checking "enable_call_home" instead of "enable_ibm_call_home"
attribute on the ctx object.

Resolves: rhbz#2243115

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 41e2ef7)
(cherry picked from commit 4d8b471)

Conflicts:
	src/cephadm/cephadm.py

<<<<<<< HEAD
    # initial vars
    ctx.fsid = ctx.fsid or make_fsid()
    fsid = ctx.fsid
    if not is_fsid(fsid):
        raise Error('not an fsid: %s' % fsid)

    if ctx.enable_storage_insights and not ctx.enable_call_home:
=======
    if ctx.enable_storage_insights and not ctx.enable_ibm_call_home:
>>>>>>> 4d8b471 (cephadm: fix bootstrap with --enable-storage-insights set)
        raise Error('Cannot enable Storage Insights without enabling call home (--enable-ibm-call-home)')
    elif ctx.enable_ibm_call_home:
        verify_call_home_settings(ctx)

Conflict was reslolved by keeping everything, except for:
    if ctx.enable_storage_insights and not ctx.enable_call_home:

mgr/callhome: cephadm sos command wrapper

Implementation of a wrapper for the sos command in cephadm

Signed-off-by: Juan Miguel Olmo Martínez <[email protected]>
(cherry picked from commit e2108ba60b025d2813bcece7fa4dbb7998893ad7)

Resolves: rhbz#2264462
          https://bugzilla.redhat.com/show_bug.cgi?id=2264462
(cherry picked from commit 4b0049f)

mgr/ccha: Fix cephadm sos command error (#53)

The cephadm sos command fails

This commit can be safely squashed along with:
4b0049f
mgr/callhome: cephadm sos command wrapper
in future releases

Resolves: rhbz#2267676
          https://bugzilla.redhat.com/show_bug.cgi?id=2267676

Signed-off-by: Juan Miguel Olmo Martínez <[email protected]>
(cherry picked from commit 1d413c767d4dc034202907e1393f9e69808004db)
(cherry picked from commit 873b28e)

cephadm: make cephadm sos cmd more robust (#56)

This commit is extracted from bac75bb
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/bac75bb1b9052982fd9b4ebc3ff5116b67081c54

This commit was created with:

  $ git format-patch -1 bac75bb -- src/cephadm/cephadm.py
  0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  $
  $ git apply -3 0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.

Signed-off-by: Yaarit Hatuka <[email protected]>
(cherry picked from commit 37be1c3)

Conflicts:
        src/cephadm/cephadm.py

The conflict we saw:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

<<<<<<< HEAD
=======
    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # enable autotune for osd_memory_target
    logger.info('Enabling autotune for osd_memory_target')
    cli(['config', 'set', 'osd', 'osd_memory_target_autotune', 'true'])

>>>>>>> 37be1c3 (cephadm: add Call Home and Storage Insights)
    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```

The conflict was resolved by removing the osd autotune lines:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```

(cherry picked from commit 8b565c3)
(cherry picked from commit a22f065)

Conflicts:
	src/pybind/mgr/orchestrator/module.py
aainscow referenced this pull request in aainscow/ceph Jul 14, 2026
This is a combination of 7 commits in order to ease maintenance.

This commit is extracted from the initial commit that added the
call_home_agent mgr module (de6cbfb),
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/de6cbfbde53c64877941751d2ef5f8198ae5dccc

This commit was created with:

  $ git format-patch -1 de6cbfb -- src/cephadm/cephadm.py
  0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  $
  $ git apply -3 0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.
  $
  $ git add src/cephadm/cephadm.py

Signed-off-by: Yaarit Hatuka <[email protected]>

cephadm: fix setting first and last name fields for call home

During bootstrap we were setting the email field to
be the email, first name, and last name in succession
so if all these fields were provided the email would end
up as the last name and the actual email and first name
would be thrown away.

The fix is pretty self-explanatory

Resvoles: rhbz#2242916

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 54a07e5)
(cherry picked from commit 9989d06)

cephadm: fix call home bootstrap error message

Specifically

--ceph-call-home-contect-email ("contect")-> --ceph-call-home-contact-email
--ceph-call-home-context-phone ("context") -> --ceph-call-home-contact-phone
--ceph-call-home-contact-first-name (for last name setting)
-> --ceph-call-home-contact-last-name

Resolves: rhbz#2242918

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 1623928)
(cherry picked from commit 0c1fea8)

cephadm: fix bootstrap with --enable-storage-insights set

If --enable-storage-insights is set, there was an
additional check that we aren't enabling storage insights
but not call home. This check was broken as it was
checking "enable_call_home" instead of "enable_ibm_call_home"
attribute on the ctx object.

Resolves: rhbz#2243115

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 41e2ef7)
(cherry picked from commit 4d8b471)

Conflicts:
	src/cephadm/cephadm.py

<<<<<<< HEAD
    # initial vars
    ctx.fsid = ctx.fsid or make_fsid()
    fsid = ctx.fsid
    if not is_fsid(fsid):
        raise Error('not an fsid: %s' % fsid)

    if ctx.enable_storage_insights and not ctx.enable_call_home:
=======
    if ctx.enable_storage_insights and not ctx.enable_ibm_call_home:
>>>>>>> 4d8b471 (cephadm: fix bootstrap with --enable-storage-insights set)
        raise Error('Cannot enable Storage Insights without enabling call home (--enable-ibm-call-home)')
    elif ctx.enable_ibm_call_home:
        verify_call_home_settings(ctx)

Conflict was reslolved by keeping everything, except for:
    if ctx.enable_storage_insights and not ctx.enable_call_home:

mgr/callhome: cephadm sos command wrapper

Implementation of a wrapper for the sos command in cephadm

Signed-off-by: Juan Miguel Olmo Martínez <[email protected]>
(cherry picked from commit e2108ba60b025d2813bcece7fa4dbb7998893ad7)

Resolves: rhbz#2264462
          https://bugzilla.redhat.com/show_bug.cgi?id=2264462
(cherry picked from commit 4b0049f)

mgr/ccha: Fix cephadm sos command error (#53)

The cephadm sos command fails

This commit can be safely squashed along with:
4b0049f
mgr/callhome: cephadm sos command wrapper
in future releases

Resolves: rhbz#2267676
          https://bugzilla.redhat.com/show_bug.cgi?id=2267676

Signed-off-by: Juan Miguel Olmo Martínez <[email protected]>
(cherry picked from commit 1d413c767d4dc034202907e1393f9e69808004db)
(cherry picked from commit 873b28e)

cephadm: make cephadm sos cmd more robust (#56)

This commit is extracted from bac75bb
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/bac75bb1b9052982fd9b4ebc3ff5116b67081c54

This commit was created with:

  $ git format-patch -1 bac75bb -- src/cephadm/cephadm.py
  0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  $
  $ git apply -3 0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.

Signed-off-by: Yaarit Hatuka <[email protected]>
(cherry picked from commit 37be1c3)

Conflicts:
        src/cephadm/cephadm.py

The conflict we saw:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

<<<<<<< HEAD
=======
    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # enable autotune for osd_memory_target
    logger.info('Enabling autotune for osd_memory_target')
    cli(['config', 'set', 'osd', 'osd_memory_target_autotune', 'true'])

>>>>>>> 37be1c3 (cephadm: add Call Home and Storage Insights)
    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```

The conflict was resolved by removing the osd autotune lines:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```

(cherry picked from commit 8b565c3)
Ericmzhang pushed a commit to Ericmzhang/ceph that referenced this pull request Oct 15, 2026
This is a combination of 7 commits in order to ease maintenance.

This commit is extracted from the initial commit that added the
call_home_agent mgr module (de6cbfb),
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/de6cbfbde53c64877941751d2ef5f8198ae5dccc

This commit was created with:

  $ git format-patch -1 de6cbfb -- src/cephadm/cephadm.py
  0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  $
  $ git apply -3 0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.
  $
  $ git add src/cephadm/cephadm.py

Signed-off-by: Yaarit Hatuka <[email protected]>

cephadm: fix setting first and last name fields for call home

During bootstrap we were setting the email field to
be the email, first name, and last name in succession
so if all these fields were provided the email would end
up as the last name and the actual email and first name
would be thrown away.

The fix is pretty self-explanatory

Resvoles: rhbz#2242916

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 54a07e5)
(cherry picked from commit 9989d06)

cephadm: fix call home bootstrap error message

Specifically

--ceph-call-home-contect-email ("contect")-> --ceph-call-home-contact-email
--ceph-call-home-context-phone ("context") -> --ceph-call-home-contact-phone
--ceph-call-home-contact-first-name (for last name setting)
-> --ceph-call-home-contact-last-name

Resolves: rhbz#2242918

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 1623928)
(cherry picked from commit 0c1fea8)

cephadm: fix bootstrap with --enable-storage-insights set

If --enable-storage-insights is set, there was an
additional check that we aren't enabling storage insights
but not call home. This check was broken as it was
checking "enable_call_home" instead of "enable_ibm_call_home"
attribute on the ctx object.

Resolves: rhbz#2243115

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 41e2ef7)
(cherry picked from commit 4d8b471)

Conflicts:
	src/cephadm/cephadm.py

<<<<<<< HEAD
    # initial vars
    ctx.fsid = ctx.fsid or make_fsid()
    fsid = ctx.fsid
    if not is_fsid(fsid):
        raise Error('not an fsid: %s' % fsid)

    if ctx.enable_storage_insights and not ctx.enable_call_home:
=======
    if ctx.enable_storage_insights and not ctx.enable_ibm_call_home:
>>>>>>> 4d8b471 (cephadm: fix bootstrap with --enable-storage-insights set)
        raise Error('Cannot enable Storage Insights without enabling call home (--enable-ibm-call-home)')
    elif ctx.enable_ibm_call_home:
        verify_call_home_settings(ctx)

Conflict was reslolved by keeping everything, except for:
    if ctx.enable_storage_insights and not ctx.enable_call_home:

mgr/callhome: cephadm sos command wrapper

Implementation of a wrapper for the sos command in cephadm

Signed-off-by: Juan Miguel Olmo Martínez <[email protected]>
(cherry picked from commit e2108ba60b025d2813bcece7fa4dbb7998893ad7)

Resolves: rhbz#2264462
          https://bugzilla.redhat.com/show_bug.cgi?id=2264462
(cherry picked from commit 4b0049f)

mgr/ccha: Fix cephadm sos command error (ceph#53)

The cephadm sos command fails

This commit can be safely squashed along with:
4b0049f
mgr/callhome: cephadm sos command wrapper
in future releases

Resolves: rhbz#2267676
          https://bugzilla.redhat.com/show_bug.cgi?id=2267676

Signed-off-by: Juan Miguel Olmo Martínez <[email protected]>
(cherry picked from commit 1d413c767d4dc034202907e1393f9e69808004db)
(cherry picked from commit 873b28e)

cephadm: make cephadm sos cmd more robust (ceph#56)

This commit is extracted from bac75bb
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/bac75bb1b9052982fd9b4ebc3ff5116b67081c54

This commit was created with:

  $ git format-patch -1 bac75bb -- src/cephadm/cephadm.py
  0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  $
  $ git apply -3 0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.

Signed-off-by: Yaarit Hatuka <[email protected]>
(cherry picked from commit 37be1c3)

Conflicts:
        src/cephadm/cephadm.py

The conflict we saw:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

<<<<<<< HEAD
=======
    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # enable autotune for osd_memory_target
    logger.info('Enabling autotune for osd_memory_target')
    cli(['config', 'set', 'osd', 'osd_memory_target_autotune', 'true'])

>>>>>>> 37be1c3 (cephadm: add Call Home and Storage Insights)
    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```

The conflict was resolved by removing the osd autotune lines:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```

(cherry picked from commit 8b565c3)
(cherry picked from commit a22f065)

Conflicts:
	src/pybind/mgr/orchestrator/module.py
(cherry picked from commit be79224)
Ericmzhang pushed a commit to Ericmzhang/ceph that referenced this pull request Oct 15, 2026
This is a combination of 7 commits in order to ease maintenance.

This commit is extracted from the initial commit that added the
call_home_agent mgr module (de6cbfb),
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/de6cbfbde53c64877941751d2ef5f8198ae5dccc

This commit was created with:

  $ git format-patch -1 de6cbfb -- src/cephadm/cephadm.py
  0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  $
  $ git apply -3 0001-mgr-call_home_agent-IBM-Call-Home-Agent-module.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.
  $
  $ git add src/cephadm/cephadm.py

Signed-off-by: Yaarit Hatuka <[email protected]>

cephadm: fix setting first and last name fields for call home

During bootstrap we were setting the email field to
be the email, first name, and last name in succession
so if all these fields were provided the email would end
up as the last name and the actual email and first name
would be thrown away.

The fix is pretty self-explanatory

Resvoles: rhbz#2242916

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 54a07e5)
(cherry picked from commit 9989d06)

cephadm: fix call home bootstrap error message

Specifically

--ceph-call-home-contect-email ("contect")-> --ceph-call-home-contact-email
--ceph-call-home-context-phone ("context") -> --ceph-call-home-contact-phone
--ceph-call-home-contact-first-name (for last name setting)
-> --ceph-call-home-contact-last-name

Resolves: rhbz#2242918

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 1623928)
(cherry picked from commit 0c1fea8)

cephadm: fix bootstrap with --enable-storage-insights set

If --enable-storage-insights is set, there was an
additional check that we aren't enabling storage insights
but not call home. This check was broken as it was
checking "enable_call_home" instead of "enable_ibm_call_home"
attribute on the ctx object.

Resolves: rhbz#2243115

Signed-off-by: Adam King <[email protected]>
(cherry picked from commit 41e2ef7)
(cherry picked from commit 4d8b471)

Conflicts:
	src/cephadm/cephadm.py

<<<<<<< HEAD
    # initial vars
    ctx.fsid = ctx.fsid or make_fsid()
    fsid = ctx.fsid
    if not is_fsid(fsid):
        raise Error('not an fsid: %s' % fsid)

    if ctx.enable_storage_insights and not ctx.enable_call_home:
=======
    if ctx.enable_storage_insights and not ctx.enable_ibm_call_home:
>>>>>>> 4d8b471 (cephadm: fix bootstrap with --enable-storage-insights set)
        raise Error('Cannot enable Storage Insights without enabling call home (--enable-ibm-call-home)')
    elif ctx.enable_ibm_call_home:
        verify_call_home_settings(ctx)

Conflict was reslolved by keeping everything, except for:
    if ctx.enable_storage_insights and not ctx.enable_call_home:

mgr/callhome: cephadm sos command wrapper

Implementation of a wrapper for the sos command in cephadm

Signed-off-by: Juan Miguel Olmo Martínez <[email protected]>
(cherry picked from commit e2108ba60b025d2813bcece7fa4dbb7998893ad7)

Resolves: rhbz#2264462
          https://bugzilla.redhat.com/show_bug.cgi?id=2264462
(cherry picked from commit 4b0049f)

mgr/ccha: Fix cephadm sos command error (ceph#53)

The cephadm sos command fails

This commit can be safely squashed along with:
4b0049f
mgr/callhome: cephadm sos command wrapper
in future releases

Resolves: rhbz#2267676
          https://bugzilla.redhat.com/show_bug.cgi?id=2267676

Signed-off-by: Juan Miguel Olmo Martínez <[email protected]>
(cherry picked from commit 1d413c767d4dc034202907e1393f9e69808004db)
(cherry picked from commit 873b28e)

cephadm: make cephadm sos cmd more robust (ceph#56)

This commit is extracted from bac75bb
in order to include only the cephadm changes.
See:
https://gitlab.cee.redhat.com/ceph/ceph/-/commit/bac75bb1b9052982fd9b4ebc3ff5116b67081c54

This commit was created with:

  $ git format-patch -1 bac75bb -- src/cephadm/cephadm.py
  0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  $
  $ git apply -3 0001-mgr-ccha-make-cephadm-sos-cmd-more-robust-56.patch
  Applied patch to 'src/cephadm/cephadm.py' cleanly.

Signed-off-by: Yaarit Hatuka <[email protected]>
(cherry picked from commit 37be1c3)

Conflicts:
        src/cephadm/cephadm.py

The conflict we saw:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

<<<<<<< HEAD
=======
    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # enable autotune for osd_memory_target
    logger.info('Enabling autotune for osd_memory_target')
    cli(['config', 'set', 'osd', 'osd_memory_target_autotune', 'true'])

>>>>>>> 37be1c3 (cephadm: add Call Home and Storage Insights)
    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```

The conflict was resolved by removing the osd autotune lines:
```
            logger.info('\nApplying %s to cluster failed!\n' % ctx.apply_spec)

    save_cluster_config(ctx, uid, gid, fsid)

    apply_call_home_settings(ctx, cli, wait_for_mgr_restart)

    # Notify the Dashboard to show the 'Expand cluster' page on first log in.
    cli(['config-key', 'set', 'mgr/dashboard/cluster/status', 'INSTALLED'])
```

(cherry picked from commit 8b565c3)
(cherry picked from commit a22f065)

Conflicts:
	src/pybind/mgr/orchestrator/module.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant