Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ostree Software Updates #2884

Closed
wants to merge 1 commit into from
Closed

Ostree Software Updates #2884

wants to merge 1 commit into from

Conversation

@petervo
Copy link
Contributor

petervo commented Oct 1, 2015

To test, from inside the cockpit test directory run.

TEST_OS=fedora-atomic-22 ./testsuite-prepare

The generated image will have versions of ostree and rpm-ostree that work. It also contains a checked out copy of the current os at /var/local-tree and repo at /var/local-repo. You can run this image with vm-run and make changes to that tree and commit to that repo.

To make testing simplier there is a temporary ostree-run command.

./ostree-run

That will run the vm and gives you three commands

  • start-cockpit: Starts cockpit, needs to be run after every reboot.
  • start-httpd: Starts a http server on the local repo to allow you to pull updates. Until it is started you'll see errors when trying to check for updates. Doesn't persist between reboots.
  • prep-upgrade: This creates a new upgrade that installs a package, removes a package, upgrades a package and downgrades a package. This command should only be run once. If you want further updates you'll need to generate them yourself.

Because you'll probably be restarting the vm while testing running

virsh console id-from-ouput

will let you see when the machine has rebooted and is ready to accept commands again.

@petervo petervo mentioned this pull request Oct 1, 2015
@petervo petervo added the needswork label Oct 1, 2015
@petervo petervo force-pushed the petervo:ostree branch 4 times, most recently from d22b029 to 7e6cfdb Oct 1, 2015
@petervo petervo force-pushed the petervo:ostree branch from 7e6cfdb to dd9aed4 Oct 9, 2015
@petervo
Copy link
Contributor Author

petervo commented Oct 9, 2015

Still needs a little bit of work, but ready for initial review. It should now be testable with the fedora-atomic-22 vm we use for testing.

@petervo petervo force-pushed the petervo:ostree branch 2 times, most recently from 0898ffe to 3242d79 Oct 9, 2015
@petervo
Copy link
Contributor Author

petervo commented Oct 13, 2015

@stefwalter @andreasn, instructions for manual testing are added at the top. LMK if you have questions.

@stefwalter
Copy link
Contributor

stefwalter commented Oct 13, 2015

@andreasn
Copy link
Contributor

andreasn commented Oct 13, 2015

The spacing in top of this error looks a bit off.

screenshot from 2015-10-13 23-04-15

@andreasn
Copy link
Contributor

andreasn commented Oct 13, 2015

The listing of all packages is very long and easily pushes down the box below quite a lot.
How do you feel about giving listing-body the properties height: 200px and overflow-y: scroll; ?

@andreasn
Copy link
Contributor

andreasn commented Oct 13, 2015

The checking for updates text that appears briefly feels a bit twitchy. Maybe it just works to disable the button in that case since it appears so briefly.

@petervo
Copy link
Contributor Author

petervo commented Oct 13, 2015

On 10/13/2015 02:31 PM, andreasn wrote:

The checking for updates text that appears briefly feels a bit twitchy.
Maybe it just works to disable the button in that case since it appears
so briefly.


Reply to this email directly or view it on GitHub
#2884 (comment).

It's only like that if there is nothing to pull otherwise it looks good.
But of course we don't know that till after we pull. We can put in on a
delay but of course there is no guarantee that it won't finish right
after the delay expires. So not sure what the solution is.

@petervo
Copy link
Contributor Author

petervo commented Oct 13, 2015

The listing of all packages is very long and easily pushes down the box
below quite a lot.
How do you feel about giving listing-body the properties height: 200px
and overflow-y: scroll; ?

@stefwalter, design specifically said not to add scrolling. WDYT?

@andreasn
Copy link
Contributor

andreasn commented Oct 16, 2015

design specifically said not to add scrolling.

If that's by design, I'm OK with that.

@andreasn
Copy link
Contributor

andreasn commented Oct 16, 2015

We can put in on a delay but of course there is no guarantee that it won't finish right after the delay expires. So not sure what the solution is.

What if you put the message inside the listing-head div and make it go on the left of the box?

@andreasn
Copy link
Contributor

andreasn commented Oct 16, 2015

Played around with the HTML and css a bit.
If the error message is put inside the listing-head div and gets a css property of display: inline; it looks a bit more balanced.

screenshot from 2015-10-16 15-54-33

@@ -742,6 +742,20 @@ tbody.active .listing-head {
clear: right;
}

div.listing-maybe .listing-error {

This comment has been minimized.

Copy link
@stefwalter

stefwalter Oct 20, 2015

Contributor

Could you add an example of how to use these styles to the playground/patterns.html?

This comment has been minimized.

Copy link
@stefwalter

stefwalter Oct 20, 2015

Contributor

And this is worth merging early as a separate pull request, so others can make use of it.

var _ = cockpit.gettext;
var phantom_checkpoint = phantom_checkpoint || function () { };

function track(item) {

This comment has been minimized.

Copy link
@stefwalter

stefwalter Oct 20, 2015

Contributor

This function has a name that makes me think it does something different than what it does.

function notify_result(promise, scope) {
promise
.progress(function(msg) {
scope.$applyAsync(function() {

This comment has been minimized.

Copy link
@stefwalter

stefwalter Oct 20, 2015

Contributor

applyAsync is nice. I didn't know it existed.

templateUrl: 'index.html',
controller: 'indexController'
});
}])

This comment has been minimized.

Copy link
@stefwalter

stefwalter Oct 20, 2015

Contributor

The brace should move one line up to align with 'function'


function check_empty() {
if (timeout)
window.clearTimeout(timeout);

This comment has been minimized.

Copy link
@stefwalter

stefwalter Oct 20, 2015

Contributor

clearTimeout can be explicitly called with null, no need for the if.

failure: ex,
message: message };
$scope.$digest();
phantom_checkpoint();

This comment has been minimized.

Copy link
@stefwalter

stefwalter Oct 20, 2015

Contributor

Suggest implementing a helper function for doing these two together. Either that, or figure out a way to call phantom_checkpoint() globally for any digest.

<script src="../base1/bundle.js"></script>
<script src="../ostree/ostree.js"></script>
</head>
<body>

This comment has been minimized.

Copy link
@stefwalter

stefwalter Oct 20, 2015

Contributor

Body should be hidden until curtains != silent. Well either that, or just explictly show it without involving angularjs.

This comment has been minimized.

Copy link
@petervo

petervo Oct 20, 2015

Author Contributor

Are you sure, kube doesn't do that. ng-cloak and the curtains logic is on the main div inside the body, everything else is in a script tag which won't show.

If we want to use angular on the body we probably have to move the mainController.

This comment has been minimized.

Copy link
@stefwalter

stefwalter Oct 20, 2015

Contributor

Our index.html framing wants to see body appear when the page is ready. This leads to less flicker, and allows the framing spinner to work properly. So in general we should move towards doing it that way. Unless it's dumb and broken ... in which case we should change index.html and come up with a new pattern.

timeout = null;
})
.done(function(connection) {
$(client).on("connectionLost.main", function(event, ex) {

This comment has been minimized.

Copy link
@stefwalter

stefwalter Oct 20, 2015

Contributor

For multiple reconnects theseh event handlers will be connected multiple times. Why not just connect them once?


$scope.$applyAsync(function() {
$scope.runningMethod = client.running_method;
$scope.os_list = client.os_list;

This comment has been minimized.

Copy link
@stefwalter

stefwalter Oct 20, 2015

Contributor

No phantom_checkpoint()?

This comment has been minimized.

Copy link
@stefwalter

stefwalter Oct 20, 2015

Contributor

Should we just $scope.$watch(function() { phantom_checkpoint() }); ?

@petervo petervo force-pushed the petervo:ostree branch 2 times, most recently from 6d3a3bd to d128e4a Oct 21, 2015
@petervo
Copy link
Contributor Author

petervo commented Nov 6, 2015

@stefwalter @andreasn The upstream rpm-ostree changes are in giving us the option to deploy a specific commit. I can change this PR so that it uses that new deploy command when upgrading to avoid potential races. Are there any other changes we want to make to the way this UI works before we get this in?

@stefwalter
Copy link
Contributor

stefwalter commented Nov 9, 2015

Are there any other changes we want to make to the way this UI works before we get this in?

I think that was the only big missing thing. We can iterate further on the UI once it's in and people start using it.

@petervo petervo force-pushed the petervo:ostree branch 3 times, most recently from 54acc4d to 20a67a5 Nov 19, 2015
@petervo petervo changed the title WIP: ostree Ostree Software Updates Nov 20, 2015
@petervo petervo added blocked and removed needswork labels Nov 20, 2015
@petervo
Copy link
Contributor Author

petervo commented Nov 20, 2015

Updated to use the deploy command instead of upgrade, once we have a rpm-ostree rpm we can use this should be good to go.

@stefwalter
Copy link
Contributor

stefwalter commented Nov 20, 2015

@cgwalters When can we expect a new rpm-ostree release?

@stefwalter
Copy link
Contributor

stefwalter commented Nov 23, 2015

New upstream release is available. I guess we have to wait for it to be in a Fedora Atomic tree?

@dperpeet
Copy link
Member

dperpeet commented Dec 1, 2015

Fixes #645

@stefwalter stefwalter added needswork and removed blocked labels Dec 16, 2015
@petervo petervo force-pushed the petervo:ostree branch from 20a67a5 to ab7c5fa Dec 16, 2015
@petervo petervo added the blocked label Dec 17, 2015
@petervo
Copy link
Contributor Author

petervo commented Dec 17, 2015

Depends on #3343 and new testing docker images to be deployed for the tests to pass.

@petervo petervo force-pushed the petervo:ostree branch from ab7c5fa to 88c25eb Dec 17, 2015
@stefwalter
Copy link
Contributor

stefwalter commented Dec 17, 2015

We agreed this would be good to get in for the next release. So bumping priority.

@petervo petervo deleted the petervo:ostree branch Dec 17, 2015
sub-mod added a commit to sub-mod/cockpit that referenced this pull request Dec 20, 2015
Fixes cockpit-project#645
Closes cockpit-project#2884

Signed-off-by: Stef Walter <stefw@redhat.com>
 * Fixed merge conflict in test/vm-install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.